Thursday, March 18, 2010

scp remote backup

i know, i know.... i should really just use some kind of rsync to backup one computer to another. but sometimes you just need to get the job done without installing anything. here's a pretty good way to do it. it uses the handy extglob option for bash, which i'm sure i'll use for other things now that i know about it.
shopt -s extglob
cd /
scp -r -p -C !(dev|proc) user@remote.machine:/Backup/
shopt -u extglob

No comments: