Fortinet white logo
Fortinet white logo

EMS CLI Reference

7.4.5

execute backup

execute backup

generates an EMS database backup

Synopsis

The 'backup' command creates an EMS database backup and saves it either locally or remotely.

You must specify a destination for the backup file: • Use '--local.file' to save the backup to a local path (e.g., /opt/ems/backups/emsdb_20251017.backup.enc). • Or use '--remote.file' along with '--remote.ip', '--remote.port', '--remote.user', and '--remote.password' to save it remotely. If remote.password is not supplied, you will be prompted to enter it securely.

Additionally, you must provide: • '--compress.type' — either 'zip' or 'database' (defines the compression format) • '--backup.password' — password to encrypt the database backup file

Backup file name rules: • For a full EMS database backup, do NOT specify '--backup.sitename'. The backup filename must start with 'emsdb_'. Example: emsdb_20251017.backup.enc

• For a site-specific backup, you MUST specify '--backup.sitename'. The backup filename must start with 'emssite_' followed by the site name. Example: emssite_nycdb_20251017.backup.enc

execute backup [flags]

Options

      --backup.password string   A password for the database backup file, which must be provided when the database is later restored
      --backup.sitename string   The specific site name to be backup
      --compress.type string     The compression type to be used for the backup [database|zip] (default "zip")
      --copy.service string      The service that will be used to copy to the remote host [scp|ftp|sftp] (default "scp")
  -h, --help                     help for backup
      --local.file /exchange     The file name of the local database backup to be saved (in the local host /exchange folder)
      --op_id string             The operation ID will be used to track the status of the backup operation
      --remote.file string       The path/file name on the remote host to where the database backup file will be copied. The remote user must have write access to 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 to
      --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 copy service. [default: 22 for SCP/SFTP, 21 for FTP]
      --remote.user string       The user that will be used to connect to the remote host
      --yes                      Skip confirmation prompts during backup

See also

execute backup

execute backup

generates an EMS database backup

Synopsis

The 'backup' command creates an EMS database backup and saves it either locally or remotely.

You must specify a destination for the backup file: • Use '--local.file' to save the backup to a local path (e.g., /opt/ems/backups/emsdb_20251017.backup.enc). • Or use '--remote.file' along with '--remote.ip', '--remote.port', '--remote.user', and '--remote.password' to save it remotely. If remote.password is not supplied, you will be prompted to enter it securely.

Additionally, you must provide: • '--compress.type' — either 'zip' or 'database' (defines the compression format) • '--backup.password' — password to encrypt the database backup file

Backup file name rules: • For a full EMS database backup, do NOT specify '--backup.sitename'. The backup filename must start with 'emsdb_'. Example: emsdb_20251017.backup.enc

• For a site-specific backup, you MUST specify '--backup.sitename'. The backup filename must start with 'emssite_' followed by the site name. Example: emssite_nycdb_20251017.backup.enc

execute backup [flags]

Options

      --backup.password string   A password for the database backup file, which must be provided when the database is later restored
      --backup.sitename string   The specific site name to be backup
      --compress.type string     The compression type to be used for the backup [database|zip] (default "zip")
      --copy.service string      The service that will be used to copy to the remote host [scp|ftp|sftp] (default "scp")
  -h, --help                     help for backup
      --local.file /exchange     The file name of the local database backup to be saved (in the local host /exchange folder)
      --op_id string             The operation ID will be used to track the status of the backup operation
      --remote.file string       The path/file name on the remote host to where the database backup file will be copied. The remote user must have write access to 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 to
      --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 copy service. [default: 22 for SCP/SFTP, 21 for FTP]
      --remote.user string       The user that will be used to connect to the remote host
      --yes                      Skip confirmation prompts during backup

See also