]> hackdaworld.org Git - scripts/scripts.git/commitdiff
added hdw backup script
authorhackbard <hackbard>
Wed, 25 Apr 2007 07:58:48 +0000 (07:58 +0000)
committerhackbard <hackbard>
Wed, 25 Apr 2007 07:58:48 +0000 (07:58 +0000)
backup_hackdaworld.sh [new file with mode: 0755]

diff --git a/backup_hackdaworld.sh b/backup_hackdaworld.sh
new file mode 100755 (executable)
index 0000000..5545c28
--- /dev/null
@@ -0,0 +1,14 @@
+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"
+
+for dir in $VARDIRS; do
+       echo "syncing $dir ..."
+       rsync -az -e "ssh -p 3389" $dir $REMOTE/var
+done
+
+for dir in $ROOTDIRS; do
+       echo "syncing $dir ..."
+       rsync -az -e "ssh -p 3389" $dir $REMOTE
+done
+