18 July 2007

Back up like an expert with rsync

Posted by Mikhail Esteves under: LAMP; Tips .

In the last two months I’ve been traveling a lot. During the same period my main desktop computer went belly up. I would have been in trouble without rsync at my disposal — but thanks to my regular use of this utility, my data (or most of it, anyway) was already copied offsite just waiting to be used. It takes a little time to become familiar with rsync, but once you are, you should be able to handle most of your backup needs with just a short script.

What’s so great about rsync? First, it’s designed to speed up file transfer by copying the differences between two files rather than copying an entire file every time. For example, when I’m writing this article, I can make a copy via rsync now and then another copy later. The second (and third, fourth, fifth, etc.) time I copy the file, rsync copies the differences only. That takes far less time, which is especially important when you’re doing something like copying a whole directory offsite for daily backup. The first time may take a long time, but the next will only take a few minutes (assuming you don’t change that much in the directory on a daily basis).

Another benefit is that rsync can preserve permissions and ownership information, copy symbolic links, and generally is designed to intelligently handle your files.

Link



Leave a Reply

Browse

Photography

Projects

Pages

Calendar

July 2007
M T W T F S S
« Jun   Aug »
 1
2345678
9101112131415
16171819202122
23242526272829
3031  

Categories

www.flickr.com