The upgrade2 image-file backup-file command upgrades the system by using upgrade2 command from the CLI operational mode or configuration mode and saves the user files during the upgrade process.
upgrade2 image-file <image-name> backup-file <backup-file>
Specifies the image name with bin format (*.bin).
Specify a user defined backup list (*.lst).
Before upgrading, save the important data in Flash to the local PC through FTP or TFTP, and then upload it to the switch after the upgrade is completed.
During the upgrade process, the switch can automatically back up the following files in the following directories from the previous PICOS system:
If you want to save user files that are not in the above default backup file list, you need to first create or specify a .lst file and then add all those files that need to be backed up to this .lst file. You can use the backup-file=(*.lst) option to achieve this, where (*.lst) is the user created file with .lst format or specify the file path to this file.
The default directories for image file and backup file are /cftmp if users do not specify the file path.
In this example, back_files.lst is a user created file. The user has already added the file to back_files.lst that needs to be saved in the event of power off.
- Upgrade the system by using upgrade2 command and save the user files during the upgrade process.