Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Linux Perform MySQL Backup to time-based path from Webmin

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.

like image 809
Ammar Avatar asked Aug 15 '12 07:08

Ammar


People also ask

Does Webmin use MySQL?

Normally a Webmin user who has access to the MySQL Database Server module can manage all databases and use all of the module's features.

How do I access Webmin database?

Login to Virtualmin, and go to Webmin → Servers → MySQL Database Server. Click on the Module Config link, and in the System Configuration section enter the IP address of the system you setup in the MySQL host to connect to field. Click Save, and make sure that no errors are reported by Webmin connecting to MySQL.


3 Answers

MySQL Database Server > Module Config > Chose Yes on "Do strftime substitution of backup destinations?"

It work for me! :)

like image 139
Mr Vector Avatar answered Nov 04 '22 08:11

Mr Vector


You can use dynamic path, but before you must enable it in module config:

System > Filesystem Backup > Module Config > Do strftime substitution of backup destinations? > Yes

(If you are not sure about placeholders, just click on the text "Do strftime substitution of backup destinations?" in the config and help will show you.)

like image 31
Loshon Avatar answered Nov 04 '22 09:11

Loshon


I had the same problem and solved like this :

From Server select MySQL Database Server. Go to Module config (top left), and select Do strftime substitution of backup destinations? to Yes.

I use db_%d-%m-%Y.sql format for backups. (db_13-03-2013.sql)

like image 8
Христијан С. Avatar answered Nov 04 '22 08:11

Христијан С.