- Timestamp:
- Nov 6, 2010, 4:38:30 PM (14 years ago)
- Location:
- tools
- Files:
-
- 2 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
tools/etcbackup.sh
-
Property svn:keywords
set to
Id
r215 r216 1 1 #!/bin/sh 2 2 # 3 # $Id: mysqlbackup.sh 8548 2010-10-04 19:41:22Z rick $ 4 # Poor mans virtual mailbox backup. 3 # $Id$ 4 # Poor mans configuration backup. Only save the new backup if configuration 5 # content changes 6 # 5 7 # Rick van der Zwet <info@rickvanderzwet.nl> 6 8 9 TAG=`date "+%Y%m%d"` 7 10 8 TARGET=/usr/local/backup/vmailbackup/virtual.tar.gz 9 tar -C /var/mail -czf $TARGET virtual 11 BACKUPROOT=/usr/local/backup/config 12 TARGET=$BACKUPROOT/etc-$TAG.tar 10 13 14 # Check for last backup file 15 mkdir -p $BACKUPROOT 16 LAST=`ls -t1 /usr/local/backup/config/etc-*.tar | head -1` 17 18 if [ "$LAST" = "$TARGET" ]; then 19 echo "# Error file '$TARGET' does already exists" 1>&2 20 exit 1 21 fi 22 23 # Create new backup file 24 tar -C / -cf $TARGET etc usr/local/etc 2>&1 25 26 # If old file this exists, only keep new files if changes exists 27 if [ -n "$LAST" ]; then 28 PREV_MD5=`md5 -q $LAST` 29 NEW_MD5=`md5 -q $TARGET` 30 if [ "$PREV_MD5" = "$NEW_MD5" ]; then 31 rm $TARGET 32 fi 33 fi -
Property svn:keywords
set to
-
tools/mysqlbackup.sh
-
Property svn:keywords
set to
Id
r215 r216 1 1 #!/bin/sh 2 2 # 3 # $Id : mysqlbackup.sh 8548 2010-10-04 19:41:22Z rick$3 # $Id$ 4 4 # Poor mans mysql database backup. 5 5 # Rick van der Zwet <info@rickvanderzwet.nl> -
Property svn:keywords
set to
-
tools/vmailbackup.sh
-
Property svn:keywords
set to
Id
r215 r216 1 1 #!/bin/sh 2 2 # 3 # $Id : mysqlbackup.sh 8548 2010-10-04 19:41:22Z rick$3 # $Id$ 4 4 # Poor mans virtual mailbox backup. 5 5 # Rick van der Zwet <info@rickvanderzwet.nl> -
Property svn:keywords
set to
Note:
See TracChangeset
for help on using the changeset viewer.