#!/bin/sh # takes one argument - the host # .tar.gz trough STDOUT # # example: # $ ./openwrt-quick-config-backup root@router >router-config.tar.gz # # then later you can scp this file back to the router and untar it in the root # directory, then reboot the router to get back to the original config COMMAND='tar zcv' COMMAND=$COMMAND' /etc/config/*' COMMAND=$COMMAND' /etc/ppp/ip-*.d/local-mail-inform-*' COMMAND=$COMMAND' /etc/ppp/ip-up.d/local-connect-monitor-up' COMMAND=$COMMAND' /etc/ppp/options' COMMAND=$COMMAND' /etc/dropbear/*' COMMAND=$COMMAND' /etc/passwd' COMMAND=$COMMAND' /etc/group' COMMAND=$COMMAND' /etc/init.d/network' COMMAND=$COMMAND' /etc/init.d/local-adsl-led' COMMAND=$COMMAND' /etc/init.d/local-connect-monitor' COMMAND=$COMMAND' /etc/firewall.user' COMMAND=$COMMAND' /etc/hosts' COMMAND=$COMMAND' /etc/sysctl.conf' COMMAND=$COMMAND' /www/cgi-bin/monitor' # add any more that you may have on your router #COMMAND=$COMMAND' ' # do the business ssh $1 -e none $COMMAND