View Single Post
  #107  
Old 17th April 2011, 14:21
clttech clttech is offline
Junior Member
 
Join Date: Mar 2009
Posts: 15
Thanks: 1
Thanked 0 Times in 0 Posts
Default More info on error

Quote:
Originally Posted by go0ogl3 View Post
Hello,

The date results seems ok, but your temp dir does not have the sticky bit set (permissions like drwxrwxrwxt). I'm not sure this can influence the script so much...

On a second review of your errors...
- do you have any dir with "-" in the name, excepting the date? This can be a problem because the date of the backup archives is extracted from their names. (Please read the detailed description)
- for the mysql error - do you have a line in your script identical with the one below?
Code:
mysql -u$dbuser -p$dbpassword $rdb < $TAR -xvjp $BACKUPDIR/$YDATE-$MDATE/$i
If you do then the error is because $TAR variable is empty, which means the script can't find tar on your system (which tar)
If you don't have the line identical with the one above please get the latest version of the script.
I changed the sticky bit this morning
drwxrwxrwt 5 root root 4096 2011-04-17 08:01
still get the error

touch: cannot touch `/tmp/tmpbck/datestart': No such file or directory
touch: cannot touch `/tmp/tmpbck/dateend': No such file or directory
find: `/tmp/tmpbck/datestart': No such file or directory
find: `/tmp/tmpbck/datestart': No such file or directory
find: `/tmp/tmpbck/dateend': No such file or directory

When I tried to do the ./backup-res db all 2011-04-01
I get this
date: invalid date `11/'
./backup-res: line 448: [: : integer expression expected
this is line 448
if [ "$RD" -gt "$ID" ] ; then

I am not sure what the `11 is all about
I will post on some of the other sites about the making and deleting of the /tmp/tmpbck and see what I can find

Here is the line in my backup-res
mysql -u$dbuser -p$dbpassword $rdb < $TAR -xvjp $BACKUPDIR/$YDATE-$MDATE/$i

here is the only part of the script I made changes to and I do have the latest

###############################
### Begin variables section ###
###############################

# Change the variables below to fit your computer/backup

COMPUTER=`cat /etc/hostname | awk 'NR==1{print $1}'` # name of this computer
DIRECTORIES="/var/lib/mysql /var/www
/var/vmail /etc" # directories to backup
EXCLUDED="/bck /tmp /dev /proc /sys /srv /media
/var/adm /var/cache /var/run /var/lock /lib/init/rw /var/tmp
/var/log/verlihub /var/lib/amavis /var/amavis /var/spool/postfix/p*
/var/spool/postfix/var *.pid *.lock *.lck" # exclude those dir's and files
BACKUPDIR="/bck/$COMPUTER" # where to store the backups
dbuser="root" # database user
dbpassword="xxxxxxxxxxxx" # database password
email="myemail@my.com" # mail for the responsible person
TAR=`which tar` # 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

###################################
### End user editable variables ###
###################################

as for the "-" in the file names, in /var/lib/mysql there are not dir or files with that in it they all have "_". In the /var/www folder there are folders with that "-" in it, but those files restored. in the /var/www there are php-cgi-scripts and php-fcgi-scripts that I gues were made by ISPconfig 3 install...

Thanks again for your help...is there anything else you can think of I can get that may help to solve the issue.
Reply With Quote