I’ve found under MySql database Server, that there is the option to backup all database.
Now: I’ve scheduled it, to make a backup every hour. But I’d like that every backup goes to specific directory that is called with the day/hour of that moment.
For example: if I’ve got a scheduled backup on 11 AM of 25 November, Virtualmin creates a directory (25-november-11-am, for example) and after this , he run the backup.
I’ve tried to add the syntax %D-%H (as you can see in the screenshot), but the created folder doesn’t contain day and hour in its name.
Only a small detail. In the setting “Backup to directory”, I’ve wrote this: “/backup_db/%d-%m-%y-%T”.
I’ve enabled the setting “Create destination directory” and enabled the options " Do Webmin variable substitution on backup destinations and " Do strftime substitution of backup destinations ".
The problem is that currently it creates 10 folders (I need only one folder with all db). Each folder contains one or more databases.
Sorry for the delay.
Currently it works, but a detail.
I run the cron at minute 0 of each hour…the problem is that if the cron is running at the second 62 , Virtualmin creates another folder with “the new” minute.
I think that I’ll search an external solution…especially because I’d like to move the sql file to external storage…any idea on it?
Yeah, a typical programmers fault, testing at values, why don’t you try to run it at xx:05 insteadof xx:00
BTW our clock is having only 60 not 62, so if you say 62, do you assume we might think your cron job takes 62 seconds or 62 minutes? please give us more details. If it is running for 62 minutes then you will have an overlap so you have to change the frequence or give the process more priority, or simply use rsync because that is much faster.