Backup Linux Home Directory Using rsync
I need to backup my Linux home directory to one of my portable hard disk. I tried to use git, but failed since git doesn’t support large file (I failed after many tries, I have file larger than 5G). I find rsync, the fast, versatile, remote (and local) file-copying tool and I am happy with it now. rsync is very fast especially the change is incremental. rsync can generate a delta of the change.
The method is simple, just execute this command:
$ rsync -avxP --delete /path/to/directory/to/backup /path/to/directory/for/storing/bakcup
-a means archive mode -v means print out the verbose information during backuping -x means not cross filesystem boundaries -P is shortcut for --progress means printing information showing the progress of the transfer and --partial means keeping partially transferred files if the transfer is interrupted
That’s it. You can use cron to run it every day or every week.
The method can also be used to backup any kinds of directory except linux home directory. rsync also supports copying files to remote host. Please check “man rsync” for more.
Author: Zhiqiang Ma
Last updated on: Mar 23, 2011
Posted on: Apr 28, 2010
Views: 579
Tags: Command line, Fedora, Server config, Tutorial
Tags: Command line, Fedora, Server config, Tutorial