Skip to content

Instantly share code, notes, and snippets.

@tomgullo
Created August 9, 2012 17:48
Show Gist options
  • Save tomgullo/3306412 to your computer and use it in GitHub Desktop.
Save tomgullo/3306412 to your computer and use it in GitHub Desktop.
get remote backup
#!/bin/sh
mon=$(date +%m)
day=$(date +%d)
file=username@ip:/home/username/${mon}${day}<year><hour><time>dump.tar.gz
scp $file .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment