Backing up a directory over SSHTweet
Today I got an email from the IT department at UNM informing me that they'd be deleting my account in two weeks (I graduated December 2008 so I guess this was bound to happen eventually). Anyway, I still had a bunch of stuff on UNM's linux boxes that I wanted to keep so this is how I backed up my home directory:
ssh [email protected] "tar cfz - ." | cat > linux.unm.edu.tar.gz
What this is doing is tarring up everything in my home directory (with gzip
compression) and sending it to
stdout. I'm grabbing that info from
writing it to a file.
Maybe someone else will find this useful.
PS. Here's how to do it in reverse:
tar cfz - . | ssh [email protected] "cat > /home/jmhobbs/backup.tar.gz"