is it possible to create a file of set commands from a configuration file?
try “commands” command.
Please check New feature.
show interfaces tunnel | commands set tunnel tun0 encapsulation 'gre' set tunnel tun0 local-ip '10.46.1.242' set tunnel tun0 remote-ip '10.91.19.1'
recent Vyos removed ‘commands’ command in op mode, now only available in config mode.
configure show | commands | grep '^set interfaces tunnel' exit
So a simple
show configuration commands
show configuration commands | match config-sync
does not work in Vy? I’m coming from Vyatta and EdgeOS and have not set up a test machine with Vy yet.
show configuration commands works just fine. you can also run | match
Is there any way to reverse this process?
I mean that I have file with all commands and I want to generate ready config file.
I can’t remember exactly offhand, but I think the config file is stored in /opt/vyatta/config/config.boot?
its in there somewhere.
I have a script that just echos a ‘show configuration’ to a text file and stores it on tftp server
Instead of creating a script for that, these are config commands that’ll do it automatically:
set system task-scheduler task BACKUPCONFIG executable arguments ‘-l /config/config.boot -r /NetworkConfigs/$HOSTNAME-
date +\%Y\%m\%d\%H\%M.cfg -p 10.31.76.1’
set system task-scheduler task BACKUPCONFIG executable path ‘/usr/bin/tftp’
set system task-scheduler task BACKUPCONFIG interval ‘6h’
I want to do this in external Linux machine, I want to store all options of all routers on SQL and then generate ready config files for routers to update config on it. I’m looking for a tool or method to make properly made configuration files for VyOS, outside of VyOS system - on external central server.
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.