Fortinet white logo
Fortinet white logo

EMS CLI Reference

7.4.5

emscli execute restore

emscli execute restore

restores a database backup into EMS

Synopsis

The 'restore' command restores an EMS database backup/site from a local or remote location.

You must specify the backup file to restore: • Use '--local.file' to restore from a local backup (e.g., /opt/ems/backups/emsdb_20251017.backup.enc). • Use '--remote.path' along with '--remote.ip', '--remote.port', '--remote.user', and '--remote.password' to restore from a remote backup.

Restore type rules: • For a site-specific restore, you MUST provide '--restore.sitename' to specify the site to restore into. You MUST also provide '--backup.sitename' to indicate the site from which the backup was originally taken. The backup file must start with 'emssite_' followed by the site name. Example: emssite_nycdb_20251017.backup.enc • For a full EMS database restore, do NOT provide '--restore.sitename' or '--backup.sitename'. The backup file must start with 'emsdb_'. Example: emsdb_20251017.backup.enc

Ensure the file naming follows the above rules to prevent errors. Providing the correct site names ensures that site-specific restores apply to the intended site without affecting other sites or the full database.

emscli execute restore [flags]

Options

      --backup.password string    The password of the database backup file (set when the backup was first created)
      --backup.sitename string    Site name from which the backup was taken
      --copy.service string       The service that will be used to copy from the remote host [scp|ftp|sftp] (default "scp")
  -h, --help                      help for restore
      --keep.file                 If restoring from a remote backup, controls whether a copy of the backup file will be kept locally in the current folder after the restore completes
      --local.file string         The backup path/file name (on the local host) to be restored
      --op_id string              The operation ID will be used to track the status of the restore operation
      --remote.file string        The /path/filename on the remote host of the backup file to be restored. The remote user must have read access for this location.
                                  (For the FTP service, the file location is relative to the FTP root folder)
      --remote.ip string          The IP of the remote host where the database backup file will be copied from
      --remote.password string    The password for the remote user that will be used to connect to the remote host
      --remote.port int           The port to be used by the remote read service. [default: 22 for SCP/SFTP, 21 for FTP]
      --remote.user string        The user that will be used to connect to the remote host
      --restore.sitename string   Specify the site name to restore the backup into
      --yes                       Skip confirmation prompts during restore

See also

emscli execute restore

emscli execute restore

restores a database backup into EMS

Synopsis

The 'restore' command restores an EMS database backup/site from a local or remote location.

You must specify the backup file to restore: • Use '--local.file' to restore from a local backup (e.g., /opt/ems/backups/emsdb_20251017.backup.enc). • Use '--remote.path' along with '--remote.ip', '--remote.port', '--remote.user', and '--remote.password' to restore from a remote backup.

Restore type rules: • For a site-specific restore, you MUST provide '--restore.sitename' to specify the site to restore into. You MUST also provide '--backup.sitename' to indicate the site from which the backup was originally taken. The backup file must start with 'emssite_' followed by the site name. Example: emssite_nycdb_20251017.backup.enc • For a full EMS database restore, do NOT provide '--restore.sitename' or '--backup.sitename'. The backup file must start with 'emsdb_'. Example: emsdb_20251017.backup.enc

Ensure the file naming follows the above rules to prevent errors. Providing the correct site names ensures that site-specific restores apply to the intended site without affecting other sites or the full database.

emscli execute restore [flags]

Options

      --backup.password string    The password of the database backup file (set when the backup was first created)
      --backup.sitename string    Site name from which the backup was taken
      --copy.service string       The service that will be used to copy from the remote host [scp|ftp|sftp] (default "scp")
  -h, --help                      help for restore
      --keep.file                 If restoring from a remote backup, controls whether a copy of the backup file will be kept locally in the current folder after the restore completes
      --local.file string         The backup path/file name (on the local host) to be restored
      --op_id string              The operation ID will be used to track the status of the restore operation
      --remote.file string        The /path/filename on the remote host of the backup file to be restored. The remote user must have read access for this location.
                                  (For the FTP service, the file location is relative to the FTP root folder)
      --remote.ip string          The IP of the remote host where the database backup file will be copied from
      --remote.password string    The password for the remote user that will be used to connect to the remote host
      --remote.port int           The port to be used by the remote read service. [default: 22 for SCP/SFTP, 21 for FTP]
      --remote.user string        The user that will be used to connect to the remote host
      --restore.sitename string   Specify the site name to restore the backup into
      --yes                       Skip confirmation prompts during restore

See also