Help with a bash script please
I have the following bash script and it fails at line 14 and 15
(7zparameters= and 7zfilename=) I have tried everything i can think of
to get it to work, the answer has to be simple but i can't figure it.
This is going to be my new backup script, based on an earlier version
that is very similar in functionality except I wasn't using tar, in
that version.
#!/bin/sh
# Variables:
# Determine backup level
incrementalfile="/srv/tar_incremental_file"
if [ -f $incrementalfile ]
then
backuplevel=`date +%w`
else
backuplevel="0"
rm $incrementalfile > /dev/null 2>&1
fi
7zparameters='a -si -mhe=on -ppassword -t7z -m0=lzma -mx=9 -mfb=64
-md=32m -ms=on -l'
7zfilename='Daily backup - `date +%a" "%h" "%H%M"
"%d-%m-%Y`.$backuplevel.tar.7z'
backuppath="/srv/allsocool /etc"
backupslocation="/srv/backups"
tarparameters="cf - --listed-incremental=$incrementalfile "
# cd to directory for output file
cd $backupslocation
tar $tarparameters $backuppath | 7z '$7zparameters' '$7zfilename'
# Finally perform an rsync backup home nightly.
rsync -avz /srv/allsocool/ hostname:/srv/allsocool/
Adrian
--
24x7x365 != 24x7x52 Stupid or bad maths?
<erno> hm. I've lost a machine.. literally _lost_. it responds to
ping, it works completely, I just can't figure out where in my
apartment it is.
Reply to: