Project

General

Profile

« Previous | Next » 

Revision 3063

Added by Matt Jones about 18 years ago

Modified backup script to exclude the backup archives themselves rom the tar file.
This recursion had caused a disk full error at KNP.

View differences:

bin/backup-metacat.sh
38 38

  
39 39
# Make a temp dir for the backed up files
40 40
TAG=`date +%F-%H%M%S`
41
DATADIR="/var/metacat"
41 42
ARCHROOT="/var/metacat/metacat-backup"
42 43
mkdir $ARCHROOT
43 44
chgrp postgres $ARCHROOT
......
57 58
su - postgres -c "pg_dump $DBNAME > $ARCHDIR/metacat-postgres-backup.sql"
58 59

  
59 60
# Backup the data files
60
tar czf $ARCHDIR/datafiles-backup.tgz /var/metacat
61
tar czf $ARCHDIR/datafiles-backup.tgz --exclude=$ARCHROOT $DATADIR
61 62

  
62 63
# Backup LDAP to an LDIF file
63 64
slapcat -l $ARCHDIR/$DBNAME-ldap.ldif

Also available in: Unified diff