3 # small backup script for maiks wondoof stuff ... definetly pr0n!
4 # please check carefully! DATALOSS POSSIBLE :)
6 # edit this variables @ maik
7 SERVICES="//arbeitsplatz/foo //arbeitsplatz/bar"
10 PASSWORD="mausschubser"
12 # do no longer edit the following variables :)
13 MOUNT="mount -t smbfs"
14 MOUNTOPT="-o username=$USER,password=$PASSWORD"
16 # kernel must understand smbfs
17 modprobe smbfs > /dev/null 2>&1
19 for service in $SERVICES; do
20 mntpt=`echo $service | awk -F/ '{ print $4 }'`
22 $MOUNT $service /tmp/$mntpt $MOUNTOPT
24 echo "backuping files from $service to $BACKUPDIR ..."
26 rsync -avz /tmp/$mntpt $BACKUPDIR
28 umount /tmp/$mntpt && OK=1
29 if [ "$OK" = "1" ] ; then
32 echo "umount failed, not delelting mountpoint $mntpt..."