The set system syslog local-file command sets the local save location of the syslog file.
set system syslog local-file <location>
Specifies the local save location of the syslog. The value could be disk or ram.
By default, the syslog is kept in RAM.
By default, the syslog file stays in RAM. When the system is powered off and restarted, the syslog file in RAM will be cleared. You can configure the syslog to be saved to disk. When the system is powered off and restarted, the syslog saved to disk will still exist.
For N3048EP-ON, N3048ET-ON, N1148T-ON and N3132PX switches, because of the OverlayFS file system, the log files on the switch will not be saved from RAM to the flash even if you have set the save location of the syslog to disk. If you want the syslog file not to be cleared when the system is powered off and restarted, you need to perform the file backup operation. The steps are as follows or you can see File Backup.
The steps of syslog file backup are as follows:
1. Add syslog file path (If the save location of the syslog is RAM, the path is /tmp/log; else if save location of the syslog is disk, the path is /var/log) to the backup list, in /mnt/open/picos/backup_files file.
Show the backup file list:
• Set the local save location of the syslog file to disk.