restore-domain.pl

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.pl, 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.

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.

usage: restore-domain.pl --source file
                  [--test]
                  [--domain name] | [--all-domains]
                  [--feature name] | [--all-features]
                                     [--except-feature name]
                  [--reuid]
                  [--fix]
                  [--option feature name value]
                  [--all-virtualmin] | [--virtualmin config]
                  [--only-features]
                  [--shared-ip address | --ip address | --allocate-ip]

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/yourdomain.com.tgz
 - An FTP destination, like ftp://login:pass@server/backup/yourdomain.com.tgz
 - An SSH destination, like ssh://login:pass@server/backup/yourdomain.com.tgz
 - An S3 bucket, like s3://accesskey:secretkey@bucket
 
virtualmin_api_restore_domain.txt (343 views) · Last modified: 2008/12/08 13:12
 
Recent changes RSS feed

Talk and Get Help

Support
Forums
Bugs and Issues

Get Virtualmin

OS Support
Buy Online
Download
Copyright 2005-2007 Virtualmin, Inc. All rights reserved.