Timestamp in Database backup

OS type and version Ubuntu Linux 22.04.4
Webmin version 2.111
Usermin version 2.010
Virtualmin version 7.10.0 Pro
Theme version 21.10
Package updates All installed packages are up to date

I have learned my lesson. Now that I fixed my database problems, I am backing the database up on a daily basis using the command in the Webmin/servers/mariadb server tab. In the backup database dialog, it asks for a name for the backup file. I have set this up to do a daily backup at 12 midnight, which it does very well. I would like to put a timestamp on the name of the backup so that I can save several days’ worth of backups without erasing the previous day’s backup. Is there any way to create a name that has a timestamp on it so it will create a unique name each time it is run. Thanks.

Do strftime style time substitutions on file or directory name.

The gear at the top of a module page will have configuration options for that module.


To add to this, you then need to set your backup filename to something with strftime variables in it. (Those variables can be found here: strftime(3) - Linux manual page or you can click on the help for that option in the Virtualmin Scheduled Backups page…I should add it to the MySQL/Mariadb module help, too, I guess.)

1 Like

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.