I run the following command:
/usr/libexec/webmin/virtual-server/restore-domain.pl --source s3://$AWS_ACCESS_KEY_ID:$AWS_SECRET_ACCESS_KEY@$bucket --all-domains --all-features --all-virtualmin --except-feature mysql
Which results in the following:
--------
Checking for missing features ..
.. all features in backup are supported
Starting restore..
Downloading archive from Amazon S3 server ..
.. done
Extracting backup archive files ..
.. done
Re-creating virtual server xxxxremovedxxxxx.com ..
.. a clash was detected : A MySQL database called definedpurpose or user called xxxremovedxxxx already exists
Restoring Virtualmin settings (Module configuration, Server templates, Reseller accounts, New mailbox email messages, Custom fields, links and shells, Third-party script installers, Third-party content styles, Scheduled Virtualmin backups) ..
.. done
Restore failed!
--------
The restore script still tries to import the MySQL data. Am I doing something daft?
Background info: The MySQL databases do not need restoring as they are stored on an EBS device, so the MySQL databases persist between EC2 instance reboots.
Thanks!
Adam
PS. Really sorry for all the tickts, they should die down soon, I promise!
Comments
This flag is still ignored:
and since there is no ignore-errors flag batch restores are problematic in a MySQL replication environment where databases already exist.
Submitted by andreychek on Sun, 01/19/2020 - 10:09 Comment #18
We can certainly look into that, though since this request is 12 years old, could you start a new bug report?
It's likely a different issue now, though even if not it'd be good to start fresh. Thanks!
Hi @andreychek,
After banging my head for an hour I found this is the combination of flags that work:
--all-domains --all-features --except-feature mysql --only-features --only-missing
The key being
--only-features
. It appears--except-feature
doesn't work unless you have--only-features
Submitted by JamieCameron on Mon, 01/20/2020 - 17:14 Comment #20
The
--only-features
flag will limit restored and re-created domains to the features that were included in the backup. Without it, the re-created domains will still have MySQL enabled, but the contents of any DBs won't be restored.