nsbin/sync_data
Nico Schottelius d3c6e29902 Initial commit
2006-07-20 09:54:37 +02:00

47 lines
952 B
Bash
Executable file

#!/bin/sh
#
# Author: Nico Schottelius <nico-linux@schottelius.(org|net)>
# Date: 27-Feb-2003
# Last Modified: 27-Feb-2003
#
if [ $# -ne 2 ]; then
echo rsync '[import|export]' target
exit 1
fi
BACKUP_BASE="/tmp/backup/"
RSYNC="rsync -e ssh -abvz --backup-dir=$BACKUP_BASE --delete"
# source is normally local
case "$2" in
wdt-home)
SRC=~/firmen/wdt/rsync/home/
DEST=fs1:/home/nico/
;;
wdt-doc)
SRC=~/firmen/wdt/rsync/doc/
DEST=fs2:/mnt/data/spezial/edv/doc/
;;
wdt-cgi)
SRC=~/firmen/wdt/rsync/cgi/
DEST=fs1:/usr/local/apache/cgi-bin/ist-werte/
;;
h07-fki)
SRC=~/temp/IMPORTANT_DOCS/linux_tasks/2fpd/decr-f/fake_install/
DEST=telmich@server1.h07.org:public_html/projects/fake-install/
;;
*)
echo "No such target"
exit 1
;;
esac
# normally export
if [ "$1" = "import" ]; then
tmp=$SRC
SRC=$DEST
DEST=$tmp
fi
$RSYNC $SRC $DEST