Cron + MySQL Backup

resilientclan

New Member
Messages
1
Reaction score
0
Points
0
Hey x10!

So I have this cron job, with this command:
Code:
mysqldump -user=rgclan_db1 --password=MYPASSWORD --all-databases | gzip > /home/rgclan/backups/sql_`date %m-%d-%Y'`.sql.gz
with intent to just dump and compress my MySQL databases.

The problem is all I get is a 20 byte empty .gz file.

Anybody have some insight as to what could cause this? Maybe someone can give me a working line?

---------- Post added at 11:33 AM ---------- Previous post was at 11:30 AM ----------

Forum isn't letting me edit that last post...
this is the actual line:

Code:
mysqldump -user=rgclan_db1 --password=MYPASSWORD --all-databases | gzip > /home/rgclan/backups/sql_`date +%m-%d-%Y'`.sql.gz
 

GtoXic

x10 Support
Messages
636
Reaction score
17
Points
0
OK, I took a final look when you left IRC and I have the code that works for me which should also work on the x10 servers.

Code:
mysqldump -uUSER --password=PASSWORD --all-databases | gzip > path/to/directory/sql_`date +%m-%d-%Y`.sql.gz
 
Top