Help with creating a Virtualmin backup strategy

Last year, I spent a fair amount of time creating and implementing a virtualmin scheduled backup strategy. Basically the idea was to do a full backup on each site once a month, and then an incremental daily, stored in an S3 bucket. Monthly full backups kept for a year, daily incremental backups kept for 60 days. It appeared to be working. But it’s not.

Today I needed to retrieve a file that was changed 2 months ago, so I downloaded a full backup tar.gz from S3. I used a archiving tool to extract the files to my local Mac HD, and found that the contents of public_html was practically empty. There were various .tpl and .hlp files in some folders, but no .php files of which there should be thousands.

I verified that this particular scheduled backup was set as a “Full” back up. It was indeed. Tried manually doing a backup again, extracted the tar.gz and it had the same results. So no real differences between today and 60 days ago.

Then I tried changing the “Backup Level” to “Neither (all files, and don’t update incremental state)”, fired off the backup, downloaded and extracted the tar.gz, and all the files were there!

But as I was doing that, the time had come for the scheduled diff/incremental backup to fire off, and it failed. It hadn’t failed before. So apparently changing the backup level conflicted with the ability of the scheduled diff to do what it needed. Errors here:

Dumping MySQL database civicrm …
… gzip failed! gzip: /home/crm/.backup/payments.domain.org_mysql_civicrm: No such file or directory

Dumping MySQL database crm ..
.. dump failed! sh: 1: cannot create /home/crm/.backup/payments.domain.org_mysql_crm: Directory nonexistent

mysqldump: Got errno 32 on write

So clearly I am misunderstanding something about how to set up a virtualmin backup strategy. I looked in the docs and there isn’t very much about backup levels, and nothing about “Neither” mode.


1 Like

Anyone have any ideas about this?