Forum Moderators: open

Message Too Old, No Replies

mysqldump producing same dump file

Dump file does not include newly added rows

         

milanmk

7:52 am on Feb 25, 2007 (gmt 0)

10+ Year Member



I am running a nightly script to dump MySQL database with the following cron entry:-

mysqldump -u USERNAME -pPASSWORD -B DATABASENAME > /home/example/dbdump`date +\%u`.sql

Everytime it is producing the same dump file with the old data i.e. today’s file is having the same data as it was two days ago but the actual database have been updated with quite amount of data in those two days.

Your help is much appreciated.

Milan

milanmk

6:15 pm on Feb 25, 2007 (gmt 0)

10+ Year Member



Got it solved myself.

Milan

coopster

11:07 pm on Feb 26, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



What was it?

milanmk

6:10 am on Feb 27, 2007 (gmt 0)

10+ Year Member



Silly mistake of not changing the database name in the cron file. Actually, I have added a hyphen (-) in the database name and I kept the old database as it is, so every midnight mysqldump was producing the same dump file from that old database.

Milan

coopster

6:30 pm on Feb 27, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Silly mistake

Boy, I'm glad I never make them ;)
Thanks for the update, glad you got it sorted.