Project

General

Profile

« Previous | Next » 

Revision 8882

Added by Jing Tao about 10 years ago

Remove the code to stop/start ldap server.
Change the script name to stop/start tomcat.
Also backup metacat.properties.

View differences:

backup-metacat.sh
29 29
# Device to be used for the DVD writer -- this may vary on your system
30 30
DVD=/dev/dvd
31 31

  
32
# Location the metacat.properties file
33
METACATPROPERTIESPATH=/var/lib/tomcat6/webapps/knb/WEB-INF/metacat.properties
32 34
#
33 35
# Below here lie demons
34 36
#
......
49 51
mkdir $ARCHDIR
50 52

  
51 53
# Shut down the tomcat server so nobody else changes anything while we backup
52
/etc/init.d/tomcat stop
54
/etc/init.d/tomcat6 stop
53 55

  
54 56
# Shut down ldap too
55
/etc/init.d/slapd stop
57
#/etc/init.d/slapd stop
56 58

  
59
# Copy the metacat.properties file to /var/metacat
60
cp $METACATPROPERTIESPATH $DATADIR
61

  
57 62
# Backup postgres
58 63
su - postgres -c "pg_dump $DBNAME > $ARCHDIR/metacat-postgres-backup.sql"
59 64

  
......
64 69
slapcat -l $ARCHDIR/$DBNAME-ldap.ldif
65 70

  
66 71
# Restart LDAP
67
/etc/init.d/slapd start
72
#/etc/init.d/slapd start
68 73

  
69 74
# Restart tomcat
70
/etc/init.d/tomcat start
75
/etc/init.d/tomcat6 start
71 76

  
72 77
# Tar up the archive and copy it to archive media
73 78
cd $ARCHROOT

Also available in: Unified diff