PDA

View Full Version : MySQL backup


riffola
02-19-2001, 03:53 PM
Hi,

I tried out the technique shown on this forum to backup a MySQL db via Crontab, and it didn't work.

I dont remember the exact lines I put into crontab as it was sometime back, and the relevent post on this forum is no longer available.

Any help would be appreciated.

DCE
02-19-2001, 05:02 PM
It' in the FAQ
http://faq.codingclick.com/



DCE

riffola
02-21-2001, 02:02 AM
Thanks

riffola
02-25-2001, 01:02 PM
Well I tried it out just like it says in the FAQ, and it didn't work.

Any help would be appreciated.

Adam
02-27-2001, 08:39 PM
Did you try specify the complete path to mysqldump?
/Adam

riffola
02-27-2001, 08:59 PM
Yeah I used to full path, relative path, normal path, but nothing worked so I tried
mysqldump --opt --u username --pPassword table > public_html/backup.sql

the file did save, but it wasn't the SQL db, it was the mysqldump script...

Any idea what went wrong?

Adam
02-27-2001, 09:17 PM
For me, this worked:
mysqldump --opt -u myuser --password=mypassword mydatabase mytable > backup.sql
The first ~25 rows of backup.sql is related to table structure, the rest is data.
What do you mean by "the mysqldump script"?
/Adam

Son Nguyen
02-28-2001, 08:28 PM
Originally posted by riffola
Yeah I used to full path, relative path, normal path, but nothing worked so I tried
mysqldump --opt --u username --pPassword table > public_html/backup.sql

the file did save, but it wasn't the SQL db, it was the mysqldump script...

Any idea what went wrong?

You used the wrong syntax:
--user (NOT --u)
-pPASSWORD (not --pPASSWORD)

riffola
03-03-2001, 04:03 AM
thanks for the replies, it works now. :)