[rancid] vyatta/vyos
James Andrewartha
jandrewartha at ccgs.wa.edu.au
Mon Jan 5 02:28:12 UTC 2015
On 28/12/14 10:30, Antonio Querubin wrote:
> I've cobbled together support for VyOS from some previous efforts by
> various people for Vyatta (see the git log). I'm assuming VyOS is still
> close enough to Vyatta so that this should continue to work for Vyatta as
> well. I don't have access to real Vyatta routers so I'd appreciate any
> feedback from those that do.
I took a different approach for my VyOS (well, Ubiquiti EdgeOS) routers.
I use the in-built configuration backup to copy the configuration to the
rancid host:
set system config-management commit-archive location
'scp://user:password@rancidhost:/var/lib/rancid/ccgs/configs/vyoshost.domain.name'
I also made a few changes to /opt/vyatta/sbin/vyatta-commit-push.pl,
changing it to use the commands form of configuration (note also the
change from showCfg to showConfig):
my $cmd = 'cli-shell-api showConfig --show-active-only --show-commands';
and changing the save filename:
#my $cmd = "curl -s -T $tmp_push_file $uri/$save_file";
my $cmd = "curl -s -T $tmp_push_file $uri";
Then my vyosrancid file is just:
#!/usr/bin/perl
# Just copy the existing file to .new
use File::Copy qw(copy);
my $host = $ARGV[0];
copy $host, $host . ".new";
exit(0);
Obviously this isn't for everyone, being a push rather than pull setup,
but it does the job for me.
--
James Andrewartha
Network & Projects Engineer
Christ Church Grammar School
Claremont, Western Australia
Ph. (08) 9442 1757
Mob. 0424 160 877
More information about the Rancid-discuss
mailing list