From 42e75929cfa8429cc1945a47c34fba59898d4966 Mon Sep 17 00:00:00 2001 From: hackbard Date: Wed, 25 Apr 2007 08:06:22 +0000 Subject: [PATCH] different backups for primary and secondary --- README | 3 +++ backup_hackdaworld.sh | 11 +++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/README b/README index f930e58..6da006c 100644 --- a/README +++ b/README @@ -6,6 +6,9 @@ - backup.sh simple script making backups of important files and data. +- backup_hackdaworld.sh + simple rsync script to do backups of hackdaworld.org & co + - present_hdw_scripts.sh small script to copy the hdw-linux scripts on my http server diff --git a/backup_hackdaworld.sh b/backup_hackdaworld.sh index 5545c28..121fca3 100755 --- a/backup_hackdaworld.sh +++ b/backup_hackdaworld.sh @@ -1,6 +1,13 @@ REMOTE=sage.physik.uni-augsburg.de:/scratch/hackdaworld-${HOSTNAME} -VARDIRS="/var/mail /var/spool /var/www /usr/lib/cgi-bin" -ROOTDIRS="/etc /chroot /home /root" + +if [ "$HOSTNAME" = "primary" ] ; then + VARDIRS="/var/mail /var/spool /var/www /usr/lib/cgi-bin" + ROOTDIRS="/etc /chroot /home /root" +else + VARDIRS="" + ROOTDIRS="/etc /home /root" +fi + for dir in $VARDIRS; do echo "syncing $dir ..." -- 2.39.2