Manual File Backup


NOTE:

Only S5810-48TS-P switch need to do manual file backup.

S5810-48TS-P switch uses the OverlayFS file system which doesn’t allow the user files on the switch to be saved from the RAM to the flash automatically. This results in the loss of user files when the switch is powered off. The user can add the file path (the file that you want to be saved even after power off) to the backup list, in /mnt/open/picos/backup_files file, and then run the save_config command. With this technique, the user files on the backup list are backed up to the flash ensuring that the user files are not lost when the power is turned off.

PICOS has built-in default backup files, as listed below.

root@Xorplus$ cat /etc/picos/backup_files.lst 
 /etc/passwd
 /etc/shadow
 /etc/group
 /etc/gshadow
 /etc/resolv.conf
 /etc/picos/picos_start.conf
 /etc/picos/switch-public.key
 /etc/picos/pica.lic
 /pica/config/pica_startup.boot
 /pica/config/pica.conf.01
 /pica/config/pica.conf.02
 /pica/config/pica.conf.03
 /pica/config/pica.conf.04
 /pica/config/pica.conf.05
 /ovs/ovs-vswitchd.conf.db
 /ovs/function.conf.db
 /ovs/config/meters
 /ovs/config/groups
 /ovs/config/flows
 /ovs/var/lib/openvswitch/pki/
 /var/log/report_diag.log
 /var/log/report_diag.log.1
 /var/log/report_diag.log.2
 /var/log/report_diag.log.3
 /var/log/report_diag.log.4
 /var/log/report_diag.log.5
/cftmp/upgrade.log
/cftmp/upgrade2.log

Warning:

If the user operation makes change to the above files, you need to manually run the configuration saving command to save these files from the RAM to the flash. For details, please refer to Configuration Saving Guide and copy running-config startup-config.

If you want to save a user files that are not in the above default backup file list, you can follow the backup operation steps described below.

Step1         Add the file path  (the file that you want to be saved even after power off) to the backup list, in /mnt/open/picos/backup_files file.

                   For example, if you want to backup /home/admin/a.txt, then add /home/admin/a.txt to the backup file list:

root@Xorplus$ cat /etc/picos/user_backup_files.lst
/home/admin/a.txt

Step2         Under Linux bash, issue the following command manually to begin file backup.

root@Xorplus$ save_config

After the above two steps, the user file /home/admin/a.txt will be backed up to the flash. This file will not be lost when the power is turned off.

Copyright © 2024 Pica8 Inc. All Rights Reserved.