View Single Post
  #28  
Old 21st April 2010, 21:18
Toucan Toucan is offline
Senior Member
 
Join Date: Dec 2009
Posts: 479
Thanks: 78
Thanked 39 Times in 33 Posts
Default

I really like the idea of this script and would love to use it. I'm a little confused about the user variables. Is there a sample used by someone else i could see please.

I'm using debian lenny.

This is what I tried:

Code:
COMPUTER=`cat /etc/badbuntu | awk 'NR==1{print $1}'`    # name of this computer
DIRECTORIES="/adm /bin /boot /etc /home /lib /root
/sbin /usr /var"                                        # directories to backup
EXCLUDED="/bck /tmp /dev /proc /sys /media
/var/adm /var/cache /var/lib/mysql
/var/run /var/lock /lib/init/rw /var/tmp
/var/log/verlihub /var/lib/amavis /var/spool/postfix/p*
/var/spool/postfix/var *.pid *.lock *.lck"              # exclude those dir's and files
BACKUPDIR="/mnt/badback/back/$COMPUTER"                   # where to store the backups
dbuser="root"                                           # database user
dbpassword="mysqlpass"                                # database password
email="admin@gohoti.com"                             # mail for the responsible person
TAR=`backuptar`                                         # name and location of tar
ARG="-cjpSPf"           #sparse                         # tar arguments P = removed /
EARG="-xjpf"                                            # tar extract arguments P = removed /
tmpdir="/tmp/tmpbck"                                    # temp dir for database dump and other stuff
del_en="yes"                                            # Enable delete of files if used space percent > than $maxp (yes or anything else)
maxp="85"                                               # Max percent of used space before start of delete
hm="2359"                                               # last minute of the day = last minute of the restored backup of the day restored
I tried running it with:
./back-res

and got this result:
Code:
badbuntu:/# ./back-res
cat: /etc/badbuntu: No such file or directory
./back-res: line 141: backuptar: command not found
./back-res: line 272: [: -gt: unary operator expected
./back-res: line 298: -cjpSPf: command not found
./back-res: line 298: -cjpSPf: command not found
./back-res: line 298: -cjpSPf: command not found
./back-res: line 298: -cjpSPf: command not found
./back-res: line 298: -cjpSPf: command not found
./back-res: line 298: -cjpSPf: command not found
./back-res: line 298: -cjpSPf: command not found
./back-res: line 298: -cjpSPf: command not found
./back-res: line 298: -cjpSPf: command not found
./back-res: line 298: -cjpSPf: command not found
./back-res: line 298: -cjpSPf: command not found
./back-res: line 298: -cjpSPf: command not found
./back-res: line 298: -cjpSPf: command not found
./back-res: line 298: -cjpSPf: command not found
./back-res: line 298: -cjpSPf: command not found
./back-res: line 298: -cjpSPf: command not found
./back-res: line 298: -cjpSPf: command not found
./back-res: line 298: -cjpSPf: command not found
./back-res: line 332: -cjpSPf: command not found
./back-res: line 332: -cjpSPf: command not found
./back-res: line 332: -cjpSPf: command not found
./back-res: line 332: -cjpSPf: command not found
./back-res: line 332: -cjpSPf: command not found
./back-res: line 332: -cjpSPf: command not found
./back-res: line 332: -cjpSPf: command not found
./back-res: line 332: -cjpSPf: command not found
./back-res: line 332: -cjpSPf: command not found
./back-res: line 332: -cjpSPf: command not found
badbuntu:/#
Any help much appreciated

Last edited by Toucan; 21st April 2010 at 21:44.
Reply With Quote