Linux Perform MySQL Backup to time-based path from Webmin

Viewed 12182

I was trying to setup a scheduled task in Linux Ubuntu Server 12.04 (CronJob) to perform a daily backup of all my MySQL Databases on midnight.

I have installed the known Webmin (A nice web interface for managing the Web Servers).

So my issue is: whenever the backup is being performed, the files are getting overwritten!

That means: The backup of the day before yesterday are LOST, only the "Yesterday" backup is being saved!

I have tried something like setting dynamic file path like:

/var/www/mysqlbackups/%d-%m-%y

but I had no success with that :(

Can anybody help me.

Thanks alot guys.

5 Answers

You can do it in following way

Webmin > MySQL Database Server > select database > backup Database > file path in Other backup option you can use > Command to run after backup Enter ======> mv file path/filename file path/filename_date +"%Y%m%d%H%M%S".sql

Related