Automation: Configuration cloning/replication best practice

What is best practice for cloning/replicating a fully configured VyOS instance, assumed I create a completely new VM from scratch of the latest ISO (1.2.0) and want it to be identically configured as a previous one?

  1. https://wiki.vyos.net/wiki/Configuration_scripting
  2. save / load

deploy
preconfigure
remove hw-id’s from interfaces and ssh keys
save
power off

Machine ready for cloning

Thanks maybe my descriptions was a bit misleading, I meant more:

  1. Pulling out the config of the current machine
  2. Boot a new one from the latest iso
  3. Apply config from 1. to new machine

Is it better to
a) extract the config file from 1. with save and load it into the new machine.
b) or to save the config commands via show config commands and apply them via scripting?

Advantages, disadvantages…?

run show configuration commands

into text file.
Edit…

copy -> paste in new VyOS

another question - why not in place upgrade?

That would be the normal procedure, yes.

Just wanted to know how I can properly migrate over the config to a new clean baseline in case I run again into weird behaviors like this ⚓ T750 Hostname defaults to "debian" after applying rolling update without always having the effort configuring everything from scratch again.

Got it! i’m usually will load full config
and use show configuration commands to partially replicate some functionality

1 Like