Restore one or more virtual servers

To restore a Virtualmin backup from the command line, you will need to use this program. It takes very similar parameters to backup-domain, with the exceptions that --dest is replace with --source, and the --separate and --ignore-errors options are not used. The extra option --reuid can be specified to force the re-allocation of Unix UIDs and GIDs for virtual servers that are created by the restore process, which is usually a good idea as the IDs in the backup file may already be in use.

Specific features to restore can be selected with the --feature flag, followed by a feature name like dns to just restore a domain's DNS records. However in most cases you will want to a full restore, in which case the --all-features parameter should be given.

If a virtual server that does not currently exist is selected to be restored, it will be created as part of the restore process. Be careful using this program, as it will not prompt for confirmation before restoring, which will over-write the contents of restored directories, databases and configuration files.

You can limit the restore to only domains that do not yet exist yet with the --only-missing flag. Conversely, you can specify only domains that already exist with the --only-existing flag, to prevent any new virtual servers in the backup from being created.

To restore core Virtualmin settings (if included in the backup), the --all-virtualmin option can be specified as well. Alternately, you can select exactly which settings to include with the --virtualmin parameter. For example, --virtualmin config would only restore the module configuration.

When restoring a virtual server that originally had a private IP address, the same address will be used by default. However, this may not be what you want if you are restoring a domain on a different system that is not on the same network. To use a different IP address, the --ip flag can be given followed by an address. Or you can use the --allocate-ip flag to have Virtualmin select one automatically, assuming that an allocation range is defined in the template used.

When the restored server was on a shared address, it will by default be given the system's default shared IP. However, if you have defined additional shared addresses, a different one can be selected with the --shared-ip flag followed by an address.

Command Line Help

Restores a Virtualmin backup, for the domains and features specified
on the command line.

virtualmin restore-domain --source file
                         [--domain name] | [--all-domains]
                         [--feature name] | [--all-features]
                         [--except-feature name]
                         [--reuid | --no-reuid]
                         [--option "feature name value"]
                         [--all-virtualmin] | [--virtualmin config]
                         [--shared-ip address | --ip address | --allocate-ip]
                         [--only-missing | --only-existing]

Multiple domains may be specified with multiple --domain parameters.
Features must be specified using their short names, like web and dns.

The source can be one of :
 - A local file, like /backup/
 - An FTP destination, like ftp://login:pass@server/backup/
 - An SSH destination, like ssh://login:pass@server/backup/
 - An S3 bucket, like s3://accesskey:secretkey@bucket