I'm not sure if this is a bug or intentional but you cannot create a backup only for the databases. It forces you to also select the public_html directory. If you don't it complains with an error. In my case I want to create a schedule that only exports the databases. Databases always exported full, regardless of the backup type which is fine with me. The problem with the current approach is that it makes backups huge and longer when all you require is the DB. You can set incremental but then again you are still duplicating unnecessary files if you already backup the rest of the files in a different backup schedule.
To resume, Virtualmin does not let you create a backup schedule only for the databases. I think this is even true for all selections in a backup. It seems you need to export the whole web directory regardless of the other options. You cannot only select 1 item, for example only DB, or only email. The current approach means backups take longer and you are duplicating files assuming you have multiple different schedules as each one requires the public directory to be included, ouch :(
Imagine if you have one backup only for emails, another just for databases, and another for something else. You now need to also have the complete WWW files on each one which is absolutely unnecessary. It increases backup times (and CPU) and backup space.
Lets us please create backups without having to also include the public_html directory on each schedule.
Comments
Submitted by volk on Sun, 07/22/2018 - 10:23 Pro Licensee Comment #1
Submitted by andreychek on Sun, 07/22/2018 - 16:49 Comment #2
Howdy -- hmm, it should be possible to just backup a database.
Just to verify, in Backup and Restore -> Scheduled Backups -> SCHEDULE_NAME, what does the "Features and Settings" there look like?
It should be possible to do what you're after by selecting "Only those selected below...", and then only selecting one option at that point, "Contents of the server's MySQL databases".
If that's not working for you though, could you share a screenshot of how that screen looks in your case?
Submitted by volk on Mon, 07/23/2018 - 23:28 Pro Licensee Comment #3
The problem is not with how the settings looks. You can certainly only select the option "Contents of the server's MySQL databases" and nothing else while creating a schedule. Then try to run a backup and it will fail with an error.
The error says the following: A new format backup can only be done when the home directory is included
If you go back and now also select the option "Server's home directory and web pages" then it works.
Of course this means the home directory is also included on each backup.
Please test this because unless you selected this last option you cannot run a backup.
Submitted by andreychek on Tue, 07/24/2018 - 00:08 Comment #4
Ah, that does ring a bell now.
I have a scheduled backup on my personal system doing exactly what you are asking for, though now that you mention it, I realized that I couldn't use the new backup format to do it.
What I did to backup just the database is select "One file per server (old format)" as the backup format. Would that do what you're after?
Submitted by volk on Tue, 07/24/2018 - 00:13 Pro Licensee Comment #5
What is the difference while using that for backups?
I just used the default options and didn't selected the old format as I assumed the name "old" means its going to be deprecated or removed eventually.
Submitted by andreychek on Tue, 07/24/2018 - 01:09 Comment #6
Jamie, do you have any comment on the new vs old format in the backups, noting Comment #4 and #5 above?
Submitted by JamieCameron on Tue, 07/24/2018 - 17:37 Comment #7
The "old format" is less efficient if you are including the home directory, as it gets compressed twice. But it does allow more selective backups to be created.
Submitted by JamieCameron on Tue, 07/24/2018 - 17:37 Comment #8
Now I think about it, we should just hide this option and make it automatic.
Submitted by volk on Tue, 07/24/2018 - 17:39 Pro Licensee Comment #9
So should I wait for an update or switch to the old format if I just want to dump the databases every day?
Submitted by JamieCameron on Tue, 07/24/2018 - 17:40 Comment #10
Switch to the old format - there's no downside to it.
Submitted by andreychek on Tue, 07/24/2018 - 17:41 Comment #11
Yeah it'll be a Virtualmin version or two before that's in there (so possibly a couple of months or more).
If you're interested in making backups with just MySQL databases, it's no problem to use the "old format", it's not going away, it's just a different format.
Submitted by volk on Tue, 07/24/2018 - 17:41 Pro Licensee Comment #11
Ok. I will. I just thought it was strange the new format does not let you do selective backups and requires the home directory as well for backups.
Submitted by JamieCameron on Wed, 07/25/2018 - 17:01 Comment #12
Yeah, we will fix this.
Submitted by JamieCameron on Sun, 08/12/2018 - 21:18 Comment #13
A fix has been implemented for inclusion in the next release.
Submitted by IssueBot on Thu, 10/11/2018 - 20:07 Comment #14
Automatically closed - issue fixed for 2 weeks with no activity.