Project

General

Profile

« Previous | Next » 

Revision 8919

Added by Jing Tao about 10 years ago

Add the code to backup the cerificate/key of the apache server.

View differences:

src/scripts/bash/backup-metacat.sh
34 34

  
35 35
# Location of the apache configuration file
36 36
APACHECONF=/etc/apache2/sites-enabled
37

  
38
#Location of the server key
39
KEYLOCATION=/etc/ssl/private 
40

  
41
#Location of the server certificate
42
CERTLOCATION=/etc/ssl/certs/_.test.dataone.org.crt
37 43
#
38 44
# Below here lie demons
39 45
#
......
69 75
tar czf $ARCHDIR/datafiles-backup.tgz --exclude=$ARCHROOT $DATADIR
70 76

  
71 77
# Backup the apache configuration files
72
tar czhf $ARCHDIR/apache-config-backup.tgz $APACHECONF 
78
tar czhf $ARCHDIR/apache-config-backup.tgz $APACHECONF $KEYLOCATION $CERTLOCATION
73 79

  
74 80
# Backup LDAP to an LDIF file
75 81
#slapcat -l $ARCHDIR/$DBNAME-ldap.ldif
......
88 94
rm -rf $ARCHDIR
89 95

  
90 96
# Write the backup file to DVD
91
DAY=`date +%u`
92
DVDFLAG=-M
93
if [ $DAY == $SWAPDAY ] ; then
94
  DVDFLAG=-Z
95
fi
97
#DAY=`date +%u`
98
#DVDFLAG=-M
99
#if [ $DAY == $SWAPDAY ] ; then
100
  #DVDFLAG=-Z
101
#fi
96 102
#growisofs $DVDFLAG $DVD -R -J $ARCHDIR.tgz
97 103

  
98 104
# clean up any of the backup files that are older than DAYSTOKEEP

Also available in: Unified diff