Backing up vyos config and creating a new router using it

As the title states I would like to save my config and then use it to make new routers like a batch file.

So far I have used putty to tunnel in to my router and entered ‘show configuration commands’. I can then copy these commands out but I am then unsure how I would apply them without retyping them all into my new router.

Sorry I am sure this is a very easy thing to do but I havent been able to find full info on it.

Thanks for any help and I apologise for my lack of knowledge!

I never copy config.boot. I always do this on the source machine:

/opt/vyatta/sbin/vyatta-config-gen-sets.pl >setcmds.txt

Then copy to the new vyos install and edit the file replacing or deleting machine specific commands like hostname, local fw zone name, etc.
Then I do “configure” to enter configuration mode, then “source setcmds.txt” and it will load everything and you can “commit”

If you have a ton of set commands you can break it out into sections doing the ‘set firewall’ first, then ‘set policy’, etc. until you’re done

Great, thank you for your help!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.