upgrade2 image-file backup-file


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.


Command Syntax

upgrade2 image-file <image-name> backup-file <backup-file>


Parameter

Parameter

Description

image-file <image-name>

Specifies the image name with bin format (*.bin).

backup-file <backup-file>

Specify a user defined backup list (*.lst).


Usage Guidelines

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:

/etc/passwd

/etc/shadow

/etc/group

/etc/gshadow

/etc/resolv.conf

./etc/network/interfaces

/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

/cftmp/auto/

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.

For example:

admin@XorPlus> sudo upgrade2 image-file onie-installer-picos-3.7.3-91bb175-x86.bin backup-file /admin/back_files.lst

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.


Example

  • Upgrade the system by using upgrade2 command and save the user files during the upgrade process.
admin@Xorplus> upgrade2 image-file onie-installer-picos-3.7.3-91bb175-x86.bin backup-file /admin/back_files.lst

Copyright © 2024 Pica8 Inc. All Rights Reserved.