Copies new file OS image from remote SCP server and install to the switch
Parameters
Server_url username@ipaddress:filepathandname
timeout timeout
interval Specifies the maximum time (in seconds) to wait for the server to reply to the connection request. The timeout interval is from 1 to 100 seconds.
sonic-image Copies OS image.
Mode
EXEC
Example
pbnoscli# copy scp aviz@10.2.2.10:/tmp/opb-nos-mellanox-20230428.bin opbnos-image
The authenticity of host '10.2.2.10 (10.2.2.10)' can't be established.
ECDSA key fingerprint is SHA256:+S2EmXkMAA6WYu6VKodKZtsha3HpVzLCnpG95yEqqlQ.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '10.2.2.10' (ECDSA) to the list of known hosts.
aviz@10.2.2.10's password:
opb-nos-mellanox-20230714.2.5.0.bin 100% 1613MB 110.7MB/s 00:14
New image will be installed, continue? [y/N]: y
Installing image OPBNOS-master.162-dirty-20230714.075726 and setting it as default...
Command: bash /etc/sonic//opb-nos-mellanox-20230714.2.5.0.bin
Verifying image checksum ... OK.
Preparing image archive ... OK.
Installing SONiC in SONiC
<...>
Command: sync;sync;sync
Command: sleep 3
Done
pbnoscli#
//Image 'OPBNOS-master.162-dirty-20230714.075726' set as next-boot
pbnoscli# show boot
Current: OPBNOS-master.116-dirty-20230428.065112
Next: OPBNOS-master.162-dirty-20230714.075726
Available:
OPBNOS-master.162-dirty-20230714.075726
OPBNOS-master.116-dirty-20230428.065112
pbnoscli#
//Reboot the switch to boot into the new image
pbnoscli# reboot
Check if running config is saved
Do you want to reboot the device [y/n]: y
Jul 18 06:28:31.022227 System is not ready - one or more services are not up
/var/log: 195.4 MiB (204865536 bytes) trimmed on /dev/loop1
/host: 812.1 MiB (851562496 bytes) trimmed on /dev/sda3
<...>
You can verify the upgrade by using the command(s) below: