Remotely Backing Up Logs to an FTP/SFTP Server
Scenarios
To enhance data disaster recovery management and improve audit data security and system scalability, you can back up configuration logs on a remote FTP or SFTP server.
If you enable remote backup to an FTP or SFTP server, the system automatically backs up logs of the previous day at 00:30 every day, generates log files, and uploads the backup files to the corresponding folder on the FTP or SFTP server. Session recording playback logs are backed up in real time. To back up the logs of a certain day immediately, you can manually start the backup to the FTP or SFTP server.
Types of Logs That Can Be Backed Up
Table 1 lists the types of logs that can be backed up to an FTP or SFTP server.
| Log Type | Log Description | Log Path |
|---|---|---|
| System configuration |
| log-20xx-xx-xx/sysConfig |
| Session recording playback log |
| log-20xx-xx-xx/sessionLog |
| System login log |
| log-20xx-xx-xx/sysLoginLog |
| Resource login log |
| log-20xx-xx-xx/resourceLoginLog |
| Command operation log |
| log-20xx-xx-xx/commandOperLog |
| File operation log |
| log-20xx-xx-xx/fileOperLog |
| Two-person authorization log |
| log-20xx-xx-xx/doubleAuthLog |
Notes and Constraints
- To back up system configuration data during auto backup, you need to enable auto backup for system configuration first. To do so, choose and enable auto backup.
- During manual backup, your system configuration data is not backed up.
Prerequisites
- The role you belong to has the management permission for the System module. For details about how to check the permissions of each role, see Role.
- You need to prepare an FTP/SFTP server.
Enabling Auto Backup to an FTP or SFTP Server
If you enable remote backup to an FTP or SFTP server and the connectivity test is successful, the system automatically backs up logs of the previous day at 00:30 every day and uploads the logs to the remote FTP or SFTP server. Session recording playback logs are backed up in real time.
- Log in to your bastion host system.
- In the navigation pane on the left, choose to go to the log backup management page.
- On the right of the Backup to the FTP/SFTP server area, click Edit. In the displayed dialog box, complete required parameters.
Table 2 Parameters for configuring an FTP or SFTP server Parameter
Description
Status
Whether to back up data to the FTP or SFTP server. This function is disabled by default.
: Backing up logs to an FTP or SFTP server is enabled. After this function is enabled, the system automatically starts backup at 00:30 every day.
: Backing up logs to an FTP or SFTP server is disabled.
Protocol
Protocol over which logs are transferred for backing up.
- The options are FTP and SFTP.
- To select FTP, you need to enable insecure protocols first. Otherwise, the option cannot be selected.
Server IP
IP address of the FTP or SFTP server.
Port
Port used by the FTP or SFTP server.
Username
Username on the FTP or SFTP server to test whether the FTP or SFTP server is reachable.
Password
Password of the username on the FTP or SFTP server to test whether the FTP or SFTP server is reachable.
Storage Path
Path where the logs are stored.
- The path must start with a period (.). For example, if the path is ./test/abc, the absolute path is /home/username/test/abc.
- If this parameter is left empty, the backup content is stored in the home directory of the FTP or SFTP server user, for example, absolute path /home/username.
Test connectivity
Tests whether the configured FTP or SFTP server is reachable.
Only the network status between the bastion host and the FTP or SFTP server is checked. The user account on the server is not verified.
Backup Content
Type of logs to be backed up. Select at least one type.
For details about supported types, see Types of Logs That Can Be Backed Up.
Encryption password
Enter the encryption password of the backup file. This parameter is mandatory when System Config is selected for Backup Content.
The password must contain 8 to 32 characters; contain at least three types of the following characters: uppercase letters, lowercase letters, digits, and special characters !@$%^-_=+[{}]:,./?~#*; and contain only the allowed characters listed above.
User password
Enter the login password of the current user. This parameter is mandatory when System Config is selected for Backup Content.
- Click OK. You can then view the backup information on the Log Backup tab.
Manually Backing Up Logs to an FTP/SFTP Server
After configuring an FTP/SFTP server, you can manually start an immediate backup task to back up logs of a certain day to the server. During manual backup, system configuration data is not backed up by default.
- Log in to your bastion host system.
- In the navigation pane on the left, choose .
- Log in to your bastion host.
- In the navigation pane on the left, choose to go to the log backup management page.
- In the Backup to FTP/SFTP server area, configure a backup date and click Backup. Figure 1 Manual backup to an FTP/SFTP server
Follow-up Operations
- To disable FTP or SFTP server backup, click Edit. In the displayed dialog box, set Status to Disabled.
- To view or download logs backed up to an FTP or SFTP server, log in to the FTP or SFTP server.
- To play video recordings backed up to an FTP or SFTP server, download them and use a local player to play them back. For details, see Playing a Historical Session Video Recording Locally.