• I want to run a cron job to automate backing up of my database, but I would like it to automatically add the date to each backup file name to prevent overwriting the previous backup.
    I’ve got the basic command line as… mysqldump -u(username) -p(password) (databasename) >
    (pathtofilelocation)(filename.sql)
    Is it possible just to add some code to this to add the date stamp to the back up? Or can anyone recommend a similar simple way of executing this task.
    Thanks,
    newts.

Viewing 1 replies (of 1 total)
  • Thread Starter thenewts

    (@thenewts)

    Thanks for that Mark. I was running Lizard’s Backup / Restore hack on my 1.0.2 version and it’s thanks to him that my database was saved after much aggro with my hosting company ‘losing’ it several times. I’m now on 1.2 and haven’t yet re-installed the plugin, I’m not sure if it’s compatible with 1.2? Even so, it would be nice to know that a 2nd line of defence is running in the background when I forget to hit the big Backup / Restore button in the admin page! After the trouble I’ve had, it’s double backups from now on!

Viewing 1 replies (of 1 total)
  • The topic ‘Date Stamping a Cron Job Backup.’ is closed to new replies.