In <aanlktimtuudm4hphb__rfit2icojpcjj9gj1haewg...@mail.gmail.com>, Adrian Levi wrote: >backuplevel="0"
# Quotes are redundant. 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' # Single-quotes prevent the both subshell and variable expansion # Using backticks for subshell expansion is bad and this line shows it # they do not nest well with other quotes; use $() instead. 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' # Single-quotes prevents parameter expansion. # Any quotes prevents word splitting and 7zparameters needs to be # broken on whitespace before the command can process it. tar $tarparameters $backuppath | 7z $7zparameters "$7zfilename" -- Boyd Stephen Smith Jr. ,= ,-_-. =. b...@iguanasuicide.net ((_/)o o(\_)) ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-' http://iguanasuicide.net/ \_/
signature.asc
Description: This is a digitally signed message part.