Fortinet white logo
Fortinet white logo

CLI Reference

restore

restore

Use this command to restore the configuration or database from a file and change the FortiManager unit image. These commands will disconnect all sessions and restart the FortiManager unit.

Syntax

execute restore all-settings {ftp | sftp} <ip:port> <filename> <username> <password> <crptpasswd> [option1+option2+...]

execute restore all-settings <scp> <ip> <filename> <username> <ssh-cert> <crptpasswd> [option1+option2+...]

execute restore image {ftp | scp | sftp} <filepath> <ip:port> <username> <password>

execute restore image tftp <string> <ip>

execute restore logs <device name(s)> {ftp | scp | sftp} <ip> <username> <password> <directory> [vdlist]

execute restore logs-only <device name(s)> {ftp | scp | sftp} <ip> <username> <password> <directory> [vdlist]

execute restore reports <report name(s)> {ftp | scp | sftp} <ip> <username> <password> <directory> [vdlist]

execute restore reports-config {<adom_name> | all} {ftp | scp | sftp} <ip> <username> <password> <directory> [full]

Variable

Description

all-settings

Restore all FortiManager settings from a file on a server. The new settings replace the existing settings, including administrator accounts and passwords.

image

Upload a firmware image from a(an) FTP/SCP/SFTP/TFTP server to the FortiManager unit. The FortiManager unit reboots, loading the new firmware.

logs

Restore the device logs.

logs-only

Restore only the device logs.

reports

Restore device reports.

reports-config

Restore the reports configuration.

ftp

Restore from an FTP server.

sftp

Restore from a SFTP server.

scp

Restore from an SCP server.

<ip:port>

Enter the IP address of the server to get the file from and optionally , for FTP servers, the port number.

<ip>

Enter the server IP address.

<device name(s)>

Enter the device name(s) separated by a comma, or enter all for all devices.

<report name(s)>

Restore specific reports (separated by commas), all for all reports, or reports with names containing given pattern.

A '?' matches any single character.

A '*' matches any string, including the empty string, e.g.:

  • foo: for exact match
  • *foo: for report names ending with foo
  • foo*: for report names starting with foo
  • *foo*: for report names containing foo substring.

{<adom_name> | all}

Select to backup a specific ADOM or all ADOMs.

<filename>

Enter the file to get from the server. You can enter a path with the filename, if required.

<filepath>

Enter the file to get from the server. You can enter a path with the filename, if required.

<username>

The username to log on to the server. This option is not available for restore operations from TFTP servers.

<password>

The password for username on the server. This option is not available for restore operations from TFTP servers.

<ssh-cert>

The SSH certification for the server. This option is only available for restore operations from SCP servers.

<crptpasswd>

Enter the password that was used to protect backup content.

If no password was used for the backup file, use two single quotation marks ('') to indicate no password.

[option1+option2+...]

Enter keepbasic to retain IP and routing information on the original unit.

<directory>

Enter the directory.

[full]

Reports configuration full restoration.

Example

This example shows how to upload a configuration file from a FTP server to the FortiManager unit. The name of the configuration file on the FTP server is backupconfig. No crptpasswd was used when backing up the content. The IP address of the FTP server is 192.168.1.23. The user is admin with a password of mypassword. The configuration file is located in the /usr/local/backups/ directory on the TFTP server.

execute restore all-settings 192.168.1.23 /usr/local/backups/backupconfig admin mypassword ''

restore

restore

Use this command to restore the configuration or database from a file and change the FortiManager unit image. These commands will disconnect all sessions and restart the FortiManager unit.

Syntax

execute restore all-settings {ftp | sftp} <ip:port> <filename> <username> <password> <crptpasswd> [option1+option2+...]

execute restore all-settings <scp> <ip> <filename> <username> <ssh-cert> <crptpasswd> [option1+option2+...]

execute restore image {ftp | scp | sftp} <filepath> <ip:port> <username> <password>

execute restore image tftp <string> <ip>

execute restore logs <device name(s)> {ftp | scp | sftp} <ip> <username> <password> <directory> [vdlist]

execute restore logs-only <device name(s)> {ftp | scp | sftp} <ip> <username> <password> <directory> [vdlist]

execute restore reports <report name(s)> {ftp | scp | sftp} <ip> <username> <password> <directory> [vdlist]

execute restore reports-config {<adom_name> | all} {ftp | scp | sftp} <ip> <username> <password> <directory> [full]

Variable

Description

all-settings

Restore all FortiManager settings from a file on a server. The new settings replace the existing settings, including administrator accounts and passwords.

image

Upload a firmware image from a(an) FTP/SCP/SFTP/TFTP server to the FortiManager unit. The FortiManager unit reboots, loading the new firmware.

logs

Restore the device logs.

logs-only

Restore only the device logs.

reports

Restore device reports.

reports-config

Restore the reports configuration.

ftp

Restore from an FTP server.

sftp

Restore from a SFTP server.

scp

Restore from an SCP server.

<ip:port>

Enter the IP address of the server to get the file from and optionally , for FTP servers, the port number.

<ip>

Enter the server IP address.

<device name(s)>

Enter the device name(s) separated by a comma, or enter all for all devices.

<report name(s)>

Restore specific reports (separated by commas), all for all reports, or reports with names containing given pattern.

A '?' matches any single character.

A '*' matches any string, including the empty string, e.g.:

  • foo: for exact match
  • *foo: for report names ending with foo
  • foo*: for report names starting with foo
  • *foo*: for report names containing foo substring.

{<adom_name> | all}

Select to backup a specific ADOM or all ADOMs.

<filename>

Enter the file to get from the server. You can enter a path with the filename, if required.

<filepath>

Enter the file to get from the server. You can enter a path with the filename, if required.

<username>

The username to log on to the server. This option is not available for restore operations from TFTP servers.

<password>

The password for username on the server. This option is not available for restore operations from TFTP servers.

<ssh-cert>

The SSH certification for the server. This option is only available for restore operations from SCP servers.

<crptpasswd>

Enter the password that was used to protect backup content.

If no password was used for the backup file, use two single quotation marks ('') to indicate no password.

[option1+option2+...]

Enter keepbasic to retain IP and routing information on the original unit.

<directory>

Enter the directory.

[full]

Reports configuration full restoration.

Example

This example shows how to upload a configuration file from a FTP server to the FortiManager unit. The name of the configuration file on the FTP server is backupconfig. No crptpasswd was used when backing up the content. The IP address of the FTP server is 192.168.1.23. The user is admin with a password of mypassword. The configuration file is located in the /usr/local/backups/ directory on the TFTP server.

execute restore all-settings 192.168.1.23 /usr/local/backups/backupconfig admin mypassword ''