mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-22 01:13:00 +02:00
cli: add 'validate', or '-n', dry run to copy command
This commit adds config file validation to the copy command, discussed in #373. Allowing users to test their config files before restoring a backup. The feature could also be used for the automatic rollback when downgrading to an earlier version of the OS. Fixes #373 Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
@@ -191,4 +191,12 @@ change that, e.g., breaks networking, it is trivial to revert back by:
|
||||
admin@host-12-34-56:/> copy startup-config running-config
|
||||
```
|
||||
|
||||
Or restarting the device.
|
||||
Or restart the device, for example if the change to the configuration
|
||||
caused you to lose contact with the system (it happens to the best of
|
||||
us). The system will start up from the last "save gave".
|
||||
|
||||
> **Tip:** when restoring a backup of a configuration, or having manually
|
||||
> edited a config file, you can validate it using system's YANG models,
|
||||
> it is *not* applied if validation is successful:
|
||||
>
|
||||
> `copy /media/backup/old.cfg running-config validate`
|
||||
|
||||
Reference in New Issue
Block a user