Skip to content

Instantly share code, notes, and snippets.

@gotbadger
Forked from caius/Makefile
Last active July 17, 2016 13:18
Show Gist options
  • Save gotbadger/1f8bee604befd79e7adc717418d7a791 to your computer and use it in GitHub Desktop.
Save gotbadger/1f8bee604befd79e7adc717418d7a791 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 192.168.1.1 "/opt/vyatta/bin/vyatta-op-cmd-wrapper show configuration" 2> /dev/null > config.txt
save_commands:
ssh 192.168.1.1 "/opt/vyatta/bin/vyatta-op-cmd-wrapper show configuration commands" 2> /dev/null > commands.txt
save_scripts:
scp -r 192.168.1.1:/config/scripts/ . 2> /dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment