#dirs
confdir=/home/backup/conf/ #configuration files
-webdir=/home/backup/public_html #web-pages
storagedir=/backup #mountpoint of huge disc
###
###
#disse bør kunne varieres fra fs til fs?
-#disse bør flyttes ut i egen fil som kan editeres fra web kanskje?
maksantallfulle=2 #hvor mange fulle vi tar vare på
dagermellomfulle=30 #antall dager før det er på tide med ny full
logw=40
forrigecmd=""
fi
- #Prøver å ta backup med tar
+ #We try to run tar on the remote computer
if `ssh $computer "cd $filesystem ;\
tar cfl - . $forrigecmd \
--exclude-from=/tmp/.backup/exclude \
then
#perhaps it did work
mv $DATE.tmp $DATE.tgz
- #make a filelist and update the datefile
+ #make a filelist.
+ #update the datefile if the filelist is ok.
tar tvfz $DATE.tgz > $DATE.idx 2>&1 &&
echo $DATEs > ../.date &&
touch -t $DATE ../.date
grep -v ^d $DATE.idx | sort -n -r +2 > $DATE.sdx
#fix perm
- chmod 600 *tgz
- chmod 644 *sdx *idx 2>/dev/null
+ chmod 600 *tgz #only for us
+ chmod 644 *sdx *idx 2>/dev/null #everyone can read
else
#it did not work