How to replicate VyOS from a running USB flash drive to another empty one?


#1

Hello,

I’ve been trying (without success still) to do the following:

  1. I have VyOS running from usb flash drive (installed, not live booted) in production environment
  2. and I would like to create a spare usb flash drive to be ready in case of a fault of the running one by replicating / duplicating the running VyOS.

What I have tried is:
1.

dd if=/dev/sda of=/dev/sdb

sda is the running system
sdb is the empty usd flash drive that should be the spare one

Any help here is highly appreciated!
Thank you in advance!

Best regards,
Plamen


#2

“show configuration commands” or “run show configuration commands” from conf mode will list all configuration commands, save them as text file and run again from terminal when necessary.
IMHO this is the best way to preserve (and edit if necessary) configuration.


#3

Agree. Also adding the custom scripts if any. But…
In fact we have remote branch offices. There VyOS is running installed (not live booted). So it cannot be used as a source to be installed on a spare drive with “install image” command. And afterwards transferring the configuration. Initial VyOS installation remotely is blur challenge yet…