Skip to content

Instantly share code, notes, and snippets.

@duchenpaul
Created October 6, 2015 05:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save duchenpaul/8268e32553d86134ca48 to your computer and use it in GitHub Desktop.
Save duchenpaul/8268e32553d86134ca48 to your computer and use it in GitHub Desktop.
#!/bin/bash
zip -r ~/reaver_backup_`date +"%Y%m%d"`.zip /usr/local/etc/reaver;
echo 'Done zip!'
ssh -i /root/.ssh/id_rsa_3072 pi@192.168.31.179 <<'ENDSSH'
#commands to run on remote host
cd ~/;
rm reaver_backup_*.zip;
exit
ENDSSH
echo 'removing old file done'
scp -i /root/.ssh/id_rsa_3072 ~/reaver_backup*.zip pi@192.168.31.179:~/;
echo Done transfer
rm reaver_backup*.zip;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment