Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Version History

« Previous Version 2 Current »


NOTE:

Only N3048EP-ON/N3048ET-ON/N3132PX-ON/N3024ET-ON switches support this feature.

N3048EP-ON/N3048ET-ON and N3132PX use 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, 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

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.

However, 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    Check whether the running system is PICOS or PICOS2 (determine the path of backup_files described in Step 2).

              Issue the following command under Linux bash. If the result contains picos1.sqsh, the running system is PICOS; if picos2.sqsh, the running system is PICOS2.

root@XorPlus:~$ cat /proc/cmdline
root=/picos/picos1.sqsh quiet rw console=ttyS0,115200 maxcpus=2 mem=2032m envaddr=0x1C400000

Step2         Add the file path to the backup list (the file that you want to be saved even after power off), to backup_files file.

   The path of the backup_files file corresponding to the running system is as follows:

   PICOS: /mnt/open/picos/config1/backup_files

   PICOS2: /mnt/open/picos/config2/backup_files

   For example, regarding the running system is PICOS, if you want to backup /home/admin/a.txt, you need to add /home/admin/a.txt to the backup file list.

                  Then check if /home/admin/a.txt is on the backup list.

root@Xorplus$ cat /mnt/open/picos/config1/backup_files
/home/admin/a.txt

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

root@Xorplus$ save_config

After the above 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.

  • No labels