This topic contains the information about CLI commands that perform FortiDB-specific tasks.
If a command you entered fails,a return code is displayed:
This FortiDB CLI allows you to export diagnostic information to an FTP server.
diagnose system export fd_log <ftp server> <user> <password> [directory] [filename]
where:
Variable | Description |
---|---|
<ftp server> | IP address or hostname of FTP server. |
<username> | User name of account that logs on to the FTP server. |
<password> | Password of account that logs on to the FTP server. |
[directory] | Location on FTP server where you want the diagnostic file to be placed. |
[filename] | Name of the zip file that contains several log files that will be put on the FTP server. If you don't specify a filename, you will get a default file called fortidb.zip. |
Sample command:
diagnose system export fd_log <your_ftp_server> <your_ftp_username> <your_ftp_password> . myDiagnose.zip
This FortiDB CLI allows you to shutdown and restart the application server under which FortiDB is running.
execute restart appserver
This FortiDB CLI allows you to backup your local database, FortiDB system-configuration settings, archives and reports.
execute backup all-settings <ftp server> <filepath> <username> <password> [cryptpasswd]
where:
Variable | Description |
---|---|
<ftp server> | IP address or hostname of FTP server. |
<filepath> | Location on FTP server where you want the settings
file to be placed.
Note: If you don't
specify a name, you will get a default file called
fdb_allbackup.dat. |
<username> | User name of account that logs on to the FTP server. |
<password> | Password of account that logs on to the FTP server. |
[crptpasswd] | Optional password for protecting the settings file on the FTP server. |
Sample command:
execute backup all-settings <your_ftp_server> . <your_ftp_username> <your_ftp_password> myCrptpasswd
This FortiDB CLI allows you to restore previously backed up your local database, FortiDB system-configuration settings, archives and reports.
execute restore all-settings <ftp server> <filepath> <username> <password> [crptpasswd]
where:
Variable | Description |
---|---|
<ftp server> | IP address or hostname of FTP server. |
<filepath> | Location of, and filename for, the settings file on the FTP server. |
<username> | User name of account that logs on to the FTP server. |
<password> | Password of account that logs on to the FTP server. |
[crptpasswd] | Optional password for protecting the settings file on the FTP server. |
Sample command:
execute restore all-settings <your_ftp_server> ./fdb_allbackup.dat <your_ftp_username> <your_ftp_password> myCrptpasswd
This FortiDB CLI allows you to restore previously backed up your archives.
execute restore fd-archive <ftp server> <filepath> <username> <password>
where:
Variable | Description |
---|---|
<ftp server> | IP address or hostname of FTP server. |
<filepath> | Location of, and filename for, the settings file on the FTP server. |
<username> | User name of account that logs on to the FTP server. |
<password> | Password of account that logs on to the FTP server. |
Sample command:
execute restore fd-archive <your_ftp_server> ./fdb_allbackup.dat <your_ftp_username> <your_ftp_password>
This FortiDB CLI allows you to backup and then remove your archives.
execute backup-remove fd-archive <before-date> <ftp server> <username> <password> [directory][filename]
where:
Variable | Description |
---|---|
<before-date> | Date of the last archive you want included in your
backup. For example, if you specify 2008-12-31, the backup will
include archives for up to this date. The format is YYYY-MM-DD
(MM(1-12), DD(1-31)).
|
<ftp server> | IP address or hostname of FTP server. |
<username> | User name of account that logs on to the FTP server. |
<password> | Password of account that logs on to the FTP server. |
[directory] | Location on FTP server where you want the tar file to be placed. |
[filename] | Name for the tar file on the FTP server where you want the archives to be placed. The default file name is FD-ARCHIVE-<before-date>.tar. |
Sample command:
execute backup-remove fd-archive 2008-07-30 <your_ftp_server> <your_ftp_username> <your_ftp_password> . myArchives.tar
This FortiDB CLI allows you to restore archives from an FTP server.
execute restore fd-archive <ftp server> <filepath> <username> <password>
where:
Variable | Description |
---|---|
<ftp server> | IP address or hostname of FTP server. |
<filepath> | Location on the FTP server of, and the filename for, your archive file. |
<username> | User name of account that logs on to the FTP server. |
<password> | Password of account that logs on to the FTP server. |
Sample command:
execute restore fd-archive <your_ftp_server> ./myArchives.tar <your_ftp_username> <your_ftp_password>
This FortiDB CLI allows you to backup and then remove your reports.
execute backup-remove fd-report <before-date> <ftp server> <username> <password> [directory][filename]
where:
Variable | Description |
---|---|
<before-date> | Date of the reports you want included in your backup.
For example, if you specify 2008-12-31, the backup will include
reports for up to this date. The format is YYYY-MM-DD (MM(1-12),
DD(1-31)).
|
<ftp server> | IP address or hostname of FTP server. |
<username> | User name of account that logs on to the FTP server. |
<password> | Password of account that logs on to the FTP server. |
[directory] | Location on FTP server where you want the tar file to be placed. |
[filename] | Name for the tar file on the FTP server where you want the reports to be placed. The default file name is FD-REPORT-<before-date>.tar. |
Sample command:
execute backup-remove fd-report 2008-07-30 <your_ftp_server> <your_ftp_username> <your_ftp_password> . myReports.tar
FortiDB 5.0.0 Handbook 1st Edition , July 11 2013 © Copyright 2013 Fortinet Inc. All rights reserved. Latest documentation: http://docs.fortinet.com/fdb.html |