@@ -357,25 +357,45 @@ booted from one partition, an `upgrade` will apply to the other
357357
3583581 . Download and unpack the release to install. Make the image * pkg*
359359 bundle available at some URL[ ^ 10 ]
360- 2 . Assume the unit has booted the ` primary ` image. Then running the
360+ 2 . (Optional) Backup the startup configuration
361+ 3 . Assume the unit has booted the ` primary ` image. Then running the
361362 ` upgrade ` command installs a new image on the ` secondary `
362363 partition
363- 3 . As part of a successful upgrade, the boot-order is implictly
364+ 4 . As part of a successful upgrade, the boot-order is implictly
364365 changed to boot the newly installed image
365- 4 . Reboot the unit
366- 5 . The unit now runs the new image. To upgrade the remaining partition
366+ 5 . Reboot the unit
367+ 6 . The unit now runs the new image. To upgrade the remaining partition
367368 (` primary ` ), run the same upgrade command again, and (optionally)
368369 reboot to verify the upgrade
369370
370371> [ !CAUTION]
371- > During boot, the unit may [ migrate] ( #configuration-migration ) the
372- > startup configuration for any syntax changes. It is therefore
373- > important that you make sure to upgrade the other partition as well
374- > after reboot, of course after having verified your setup.
372+ > During boot (step 5), the unit may
373+ > [ migrate] ( #configuration-migration ) the startup configuration for
374+ > any syntax changes. It is therefore important that you make sure to
375+ > upgrade the other partition as well after reboot, of course after
376+ > having verified your setup.
375377
376- The CLI example below shows steps 2-4 .
378+ The CLI example below shows steps 2-5 .
377379
378- Upgrade: here the image * pkg bundle* was made available via TFTP.
380+ * Backup startup configuration:* It is recommended to backup the
381+ startup configuration before performing an upgrade. The backup is
382+ useful if the upgrade fails, and makes a later
383+ [ downgrade] ( #downgrading-infix ) smoother to conduct.
384+
385+ ```
386+ admin@example:/> dir /cfg
387+ /cfg directory
388+ backup/ ssl/ startup-config.cfg
389+
390+ admin@example:/> copy /cfg/startup-config.cfg /cfg/v25.01.0-startup-config.cfg
391+ admin@example:/> dir /cfg
392+ /cfg directory
393+ backup/ ssl/ startup-config.cfg v25.01.0-startup-config.cfg
394+
395+ admin@example:/>
396+ ```
397+
398+ * Upgrade:* Here the image * pkg bundle* was made available via TFTP.
379399
380400```
381401admin@example:/> upgrade tftp://198.18.117.1/infix-aarch64-25.03.1.pkg
@@ -393,7 +413,7 @@ Installing `tftp://198.18.117.1/infix-aarch64-25.03.1.pkg` succeeded
393413admin@example:/>
394414```
395415
396- Reboot: The unit will boot on the other partition, with the newly
416+ * Reboot:* The unit will boot on the other partition, with the newly
397417installed image. The ` Loading startup-config ` step conducts migration
398418of startup configuration if applicable.
399419
@@ -435,7 +455,7 @@ As shown, the *boot order* has been updated, so that *secondary* is
435455now the preferred boot source.
436456
437457To upgrade the remaining partition (` primary ` ), run the ` upgrade URL `
438- command again, and reboot.
458+ command again, and (optionally) reboot.
439459
440460### Configuration Migration
441461
@@ -519,8 +539,25 @@ with the unit in *failure config*.
519539
520540* Find the backup configuration file:*
521541
522- Assume you have a backup startup config for the version to downgrade
523- to (here Infix v25.01.0, config ` version 1.4 ` ).
542+ Assume you have a backup startup config for the Infix version to
543+ downgrade to (here Infix v25.01.0, config ` version 1.4 ` ).
544+
545+ The preferred approach is to use a startup configuration backed up
546+ when running Infix v25.01.0 on the unit. See the section on [ upgrading
547+ Infix] ( #upgrading-infix ) above for more information. In the example
548+ below, there is a backup file available named
549+ * v25.01.0-startup-config.cfg*
550+
551+ ```
552+ admin@example:/> dir /cfg
553+ /cfg directory
554+ backup/ ssl/ startup-config.cfg v25.01.0-startup-config.cfg
555+
556+ admin@example:/>
557+ ```
558+
559+ The alternative is to use a startup config implicitly backed up by the
560+ system as part of [ configuration migration] ( #configuration-migration ) .
524561
525562```
526563admin@example:/> dir /cfg/backup/
@@ -530,6 +567,23 @@ startup-config-1.4.cfg
530567admin@example:/>
531568```
532569
570+ > [ !CAUTION] Using a backup configuration file stored when the unit
571+ > was running the old version (e.g., v25.01.0-startup-config.cfg) is
572+ > preferred. Although backup files stored due to configuration
573+ > migration (e.g., startup-config-1.4.cfg) usually works too if the
574+ > configuration file version (` 1.4 ` ) matches, there are
575+ > situations when the system may fail to apply it as described below.
576+
577+ The * configuration file version* (` 1.4 ` ) is only incremented when
578+ changes in YANG configuration syntax mandates it to handle
579+ * upgrading* . Say the next Infix version includes a new feature
580+ setting, it can still have version ` 1.4 ` , as upgrading to it would not
581+ need migration. If a user then enables the new feature setting, the
582+ new configuration will no longer be compatible with the previous * Infix
583+ version* . A downgrade after enabling new features risks ending up with
584+ the unit in * failure config* .
585+
586+
533587* Use ` upgrade ` command to downgrade:*
534588
535589```
@@ -548,6 +602,19 @@ admin@example:/>
548602
549603* Apply the backup configuration file:*
550604
605+ It is recommended to use a backup configuration file for the Infix version to
606+ downgrade to, if there is one available.
607+
608+ ```
609+ admin@example:/> copy /cfg/v25.01.0-startup-config.cfg /cfg/startup-config.cfg
610+ Overwrite existing file /cfg/startup-config.cfg (y/N)? y
611+ admin@example:/>
612+ ```
613+
614+ An alternative is to use a backup file stored when the system
615+ conducted a [ configuration migration] ( #configuration-migration ) . See
616+ the * caution* note above.
617+
551618```
552619admin@example:/> copy /cfg/backup/startup-config-1.4.cfg /cfg/startup-config.cfg
553620Overwrite existing file /cfg/startup-config.cfg (y/N)? y
@@ -556,8 +623,7 @@ admin@example:/>
556623
557624* Reboot:*
558625
559- The unit will come up with the applied backup configuration instead of
560- failure config.
626+ The unit will come up with the applied backup configuration.
561627
562628```
563629admin@example:/> reboot
@@ -575,6 +641,9 @@ admin@example:/> reboot
575641Infix -- a Network Operating System v25.01.0 (ttyS0)
576642example login:
577643```
644+ > [ !NOTE]
645+ > If the unit despite these measures ends up in * failure config* , see
646+ > the next section for more information on how to recover.
578647
579648#### Downgrading without applying a backup startup configuration
580649
@@ -688,3 +757,5 @@ Continued configuration is done as with any unit after factory reset.
688757 using link local IPv6 addresses. This as an alternative to
689758 connecting via a console port.
690759[ ^ 10 ] : Set up an FTP/TFTP/SFTP or HTTP/HTTPS server on the same LAN.
760+
761+ [ 11 ] : scripting.md#-backup-configuration-using-sysrepocfg-and-scp
0 commit comments