Restore from S3 not working

Since I started backing up to S3, I had for the 1st time restore from backup today and it didnt work. At least not as it should.

Take a look at the contents of my bucket:

When I click on RESTORE from the scheduled backup that does INCREMENTAL virtualmin tries to restore from “kvm1/29-08-2012-inc” and fails.

When I click on RESTORE from the scheduled backup that does FULL virtualmin tries to restore from “kvm1/29-08-2012-full” and fails. It seems obvious, given that the last full backup was on the 26th. But changing the path to “kvm1/26-08-2012-full” ALSO fails. (BTW, shouldnt it suggest restoring from the last full backup?)

The error message is “Restore failed : The specified source does not contain any domains, or is not a Virtualmin backup”.

I downloaded one of the mydomain.tar.gz files from “kvm1/29-08-2012-inc” and tested it, the file is fine. I even extracted a copy of a DB from it and manually restored it. It also worked fine.

Am I missing something?!


Could you post a list of the files that are inside the kvm1/26-08-2012-full backup directory? I’d like to see why Virtualmin is rejecting them …


That file list looks OK to me.

Does it work any better if you go to Backup and Restore -> Backup Logs, find your scheduled backup, click on it, then click the Restore button?


Are you using Virtualmin 3.94? It included some changes to the S3 backup code that might solve (or cause) this problem …

yes its 3.94!

I did some more testing, but I wasn’t able to re-produce this problem … for me, S3 restores from sub-directories work just fine.

In the case where you restore from the backup log page, is the error message the same? If not, could you post the exact error message here?

Same error, Jamie. Would you like access to the system to speed up tshoot?

Yes, remote access would be extremely useful. You can email me at with the details…

For other readers of this thread - it turns out the cause was overly restrictive S3 permissions combined with poor error reporting from Virtualmin.

Thank you Jamie.

The minimum permissions for a S3 virtualmin backups are as follows. It is not advised to leave a key with full permissions inside your virtualmin install.

{ "Statement": [ { "Effect": "Allow", "Action": "s3:ListBucket", "Resource": "arn:aws:s3:::XXXXX", "Condition": { } }, { "Effect": "Allow", "Action": [ "s3:GetObject", "s3:PutObject", "s3:DeleteObject" ], "Resource": "arn:aws:s3:::XXXXX/*", "Condition": {} } ] }

s3:DeleteObject can be removed if your backup plan doesnt regularly delete old backups.

I am having this kind of issue right now across all my servers. I had one server wiped due to HDD failure and was trying to restore backup from S3. It’s just not working. I tried the same on another server, same thing.

Permissions are setup correctly as provided in this post. Any help in diagnosing what’s happening would be appreciated.

I am using AWS PIP on all my installs.