@@ -357,25 +357,45 @@ booted from one partition, an `upgrade` will apply to the other
357
357
358
358
1 . Download and unpack the release to install. Make the image * pkg*
359
359
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
361
362
` upgrade ` command installs a new image on the ` secondary `
362
363
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
364
365
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
367
368
(` primary ` ), run the same upgrade command again, and (optionally)
368
369
reboot to verify the upgrade
369
370
370
371
> [ !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.
375
377
376
- The CLI example below shows steps 2-4 .
378
+ The CLI example below shows steps 2-5 .
377
379
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.
379
399
380
400
```
381
401
admin@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
393
413
admin@example:/>
394
414
```
395
415
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
397
417
installed image. The ` Loading startup-config ` step conducts migration
398
418
of startup configuration if applicable.
399
419
@@ -435,7 +455,7 @@ As shown, the *boot order* has been updated, so that *secondary* is
435
455
now the preferred boot source.
436
456
437
457
To upgrade the remaining partition (` primary ` ), run the ` upgrade URL `
438
- command again, and reboot.
458
+ command again, and (optionally) reboot.
439
459
440
460
### Configuration Migration
441
461
@@ -519,8 +539,25 @@ with the unit in *failure config*.
519
539
520
540
* Find the backup configuration file:*
521
541
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 ) .
524
561
525
562
```
526
563
admin@example:/> dir /cfg/backup/
@@ -530,6 +567,23 @@ startup-config-1.4.cfg
530
567
admin@example:/>
531
568
```
532
569
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
+
533
587
* Use ` upgrade ` command to downgrade:*
534
588
535
589
```
@@ -548,6 +602,19 @@ admin@example:/>
548
602
549
603
* Apply the backup configuration file:*
550
604
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
+
551
618
```
552
619
admin@example:/> copy /cfg/backup/startup-config-1.4.cfg /cfg/startup-config.cfg
553
620
Overwrite existing file /cfg/startup-config.cfg (y/N)? y
@@ -556,8 +623,7 @@ admin@example:/>
556
623
557
624
* Reboot:*
558
625
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.
561
627
562
628
```
563
629
admin@example:/> reboot
@@ -575,6 +641,9 @@ admin@example:/> reboot
575
641
Infix -- a Network Operating System v25.01.0 (ttyS0)
576
642
example login:
577
643
```
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.
578
647
579
648
#### Downgrading without applying a backup startup configuration
580
649
@@ -680,11 +749,13 @@ Continued configuration is done as with any unit after factory reset.
680
749
[ 3 ] : https://www.rfc-editor.org/rfc/rfc8341
681
750
[ 4 ] : https://chrony-project.org/doc/4.6.1/chronyc.html
682
751
[ 5 ] : https://github.com/kernelkit/infix/blob/main/src/confd/yang/confd/infix-system-software.yang
683
- [ 6 ] : boot .md#system-configuration
752
+ [ 6 ] : netboot .md
684
753
[ 7 ] : introduction.md#system-boot
685
754
[ 8 ] : management.md#console-port
686
755
[ ^ 9 ] : In failure config, Infix puts all Ethernet ports as individual
687
756
interfaces. With direct access, one can connect with e.g., SSH,
688
757
using link local IPv6 addresses. This as an alternative to
689
758
connecting via a console port.
690
759
[ ^ 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