View Single Post
Old 3rd November 2010, 17:26
drewb0y drewb0y is offline
Join Date: Sep 2010
Posts: 75
Thanks: 8
Thanked 14 Times in 7 Posts
Question Finally setting up backup - a few errors

when I first ran back-res to test it out I got
/etc/back-res: line 229: /tmp/tmpbck/maildata: No such file or directory
/etc/back-res: line 235: /tmp/tmpbck/maildata: No such file or directory
/etc/back-res: line 220: /tmp/tmpbck/maildata: No such file or directory
/etc/back-res: line 220: /tmp/tmpbck/maildata: No such file or directory
/etc/back-res: line 220: /tmp/tmpbck/maildata: No such file or directory
mysqlcheck: Got error: 1045: Access denied for user 'root'@'localhost' (using password: YES) when trying to connect
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
I killed the script at this point. Checked in the /tmp/tmpbck directory and this is what I got
gateway:/tmp/tmpbck# ls -al
total 20
drwxr-xr-x 2 root root 4096 2010-11-03 11:11 .
drwxrwxrwt 5 root root 4096 2010-11-03 11:12 ..
-rw-r--r-- 1 root root  278 2010-11-03 11:11 excluded
-rw-r--r-- 1 root root    1 2010-11-03 11:11 full-backup_home.lck
-rw-r--r-- 1 root root  861 2010-11-03 11:11 maildata
Could the first error be a permissions issue?
And as for the MySQL error, I did enter the correct password in the script. I can log in with this same password using phpmyadmin.

I have an external USB 320GB drive mounted to /backups/external and there is a directory created for the computer name.

Here is my variables section with the password changed and domain name.
COMPUTER=`cat /etc/hostname | awk 'NR==1{print $1}'`    # name of this computer
DIRECTORIES="/bin /boot /etc /home /lib /lib64 /root.
/sbin /usr /var /www"                    # directories to backup
EXCLUDED="/bck /tmp /dev /proc /sys /srv /media
/var/adm /var/cache /var/lib/mysql
/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="/backups/external/$COMPUTER"                # where to store the backups
dbuser="root"                        # database user
dbpassword="mypassword"                # database password
email=""                # 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
I am able to login as root to mysql using the terminal command
mysql -u root -p
ISPConfig - Debian Squeeze Perfect Server
updated to wheezy 7.4
Roundcube Webmail 10-RC installed with Mail User Interface Plugins and MyRoundcube Plugin Manager

Last edited by drewb0y; 3rd November 2010 at 17:33. Reason: additional info
Reply With Quote