Hi all when I run the following command in my backup script I get the error shown below and the size of the tar file from the sql tables is 0kb. for i in $(echo 'SHOW DATABASES;' | mysql -u$USER -p$PASSWORD -h$HOST|grep -v 'Databases$'); do mysqldump \ -u$USER -p$PASSWORD -h$HOST \ -Q -c -C --add-drop-table --add-locks --quick --lock-tables \ $i > /tmp/systembackups/$Today/mysql_backup/$i.sql; done; ** Error ** mysqldump: Got error: 1049: Unknown database ' -Q' when selecting the database mysqldump: Got error: 1049: Unknown database ' -Q' when selecting the database mysqldump: Got error: 1049: Unknown database ' -Q' when selecting the database mysqldump: Got error: 1049: Unknown database ' -Q' when selecting the database Can anyone see why this is. Thanks Martin
I guess that you have problems with the linebreaks. make a zip file out of your shell script and attach it to this thread. make sure that you change / remove passwords in the script before you post it.
Ok I have fixed the error.... I am running a couple of versions behind with about 20 customers on this server and there are no customer sql databases stored. My backup which was tared and ziped has come to 134K does that sound about right. Thanks Martin