Skip to content

Instantly share code, notes, and snippets.

@caius
Created July 6, 2016 15:50
Show Gist options
  • Save caius/73c88bc91ea892950bf18fdddf700d03 to your computer and use it in GitHub Desktop.
Save caius/73c88bc91ea892950bf18fdddf700d03 to your computer and use it in GitHub Desktop.
Save edge router config & scripts to current directory
.PHONY: save save_config save_commands save_scripts
save:
make -j save_config save_commands save_scripts
save_config:
ssh earl "/opt/vyatta/bin/vyatta-op-cmd-wrapper show configuration" 2> /dev/null > config.txt
save_commands:
ssh earl "/opt/vyatta/bin/vyatta-op-cmd-wrapper show configuration commands" 2> /dev/null > commands.txt
save_scripts:
scp -r earl:/config/scripts/ . 2> /dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment