source: TI01-discovery/tags/stable-TI01-ingestAutomation-ALPHA/backup_ndg.sh @ 720

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI01-discovery/tags/stable-TI01-ingestAutomation-ALPHA/backup_ndg.sh@8912
Revision 720, 1.6 KB checked in by selatham, 14 years ago (diff)

adding database backup scripts

  • Property svn:executable set to *
Line 
1#!/bin/bash
2# -----------------------------------------------------------------------------
3#
4# Shell script to start up the eXist command line client.
5#
6# $Id: startup.sh,v 1.6 2002/12/28 17:37:22 wolfgang_m Exp $
7# edited to startup_ndg.sh by S.Latham 27/02/06 for use on NDG servers.
8# -----------------------------------------------------------------------------
9
10# will be set by the installer   SET BY BADC
11if [ -z "$EXIST_HOME" ]; then
12        EXIST_HOME="/usr/local/eXist"
13fi
14
15if [ -z "$JAVA_HOME" ]; then
16    JAVA_HOME="/usr/java/j2sdk1.4.2_04/jre"
17fi
18
19JAVA_CMD="$JAVA_HOME/bin/java"
20
21OPTIONS=
22
23if [ ! -f "$EXIST_HOME/start.jar" ]; then
24        echo "Unable to find start.jar. Please set EXIST_HOME to point to your installation directory."
25        exit 1
26fi
27
28OPTIONS="-Dexist.home=$EXIST_HOME"
29
30if [ -n "$JETTY_HOME" ]; then
31        OPTIONS="-Djetty.home=$JETTY_HOME $OPTIONS"
32fi
33
34# save LANG
35if [ -n "$LANG" ]; then
36        OLD_LANG="$LANG"
37fi
38# set LANG to UTF-8
39LANG=en_US.UTF-8
40
41# set java options
42if [ -z "$JAVA_OPTIONS" ]; then
43    export JAVA_OPTIONS="-Xms16000k -Xmx256000k -Dfile.encoding=UTF-8"
44fi
45
46# save LD_LIBRARY_PATH
47if [ -n "$LD_LIBRARY_PATH" ]; then
48        OLD_LIBRARY_PATH="$LD_LIBRARY_PATH"
49fi
50# add lib/core to LD_LIBRARY_PATH for readline support
51export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$EXIST_HOME/lib/core"
52JAVA_ENDORSED_DIRS="$EXIST_HOME"/lib/endorsed
53
54$JAVA_CMD $JAVA_OPTIONS $OPTIONS \
55    -Djava.endorsed.dirs=$JAVA_ENDORSED_DIRS \
56    -jar "$EXIST_HOME/start.jar" backup $*
57
58if [ -n "$OLD_LIBRARY_PATH" ]; then
59        LD_LIBRARY_PATH="$OLD_LIBRARY_PATH"
60fi
61if [ -n "$OLD_LANG" ]; then
62        LANG="$OLD_LANG"
63fi
Note: See TracBrowser for help on using the repository browser.