Talk:Backup Using Rsync

I'm having quite a difficult time believing the "tried and true" quality mentioned in the intro, as there are several items which puzzle me in this scheme:
 * The exclude rules are invoked prior to the include rules (on the command line). In my experience, the include rules rarely work this way: rsync finds a match in the exclude rule (here, ), and looks no further.
 * is excluded, yet and  are included. Even if the include rules were first, i don't think that you'd save a  at all, nor anything under it. Just to be sure, I just now made a similar test with my  directory, with the rules order as specified in the article, and another as i recommend them here, and neither dry-runs would mention saving my  nor anything in it when i launched a save of my home directory. In fact, since i also use the  option, it offered to remove them from the destination (the backup disk).
 * is specified, therefore that'll automatically exclude if you're using devfs or udev. It seems to me that Gentoo installs udev as default (at any rate, that's what i use). Also automatically excluded will be  and, and anything under . But, also excluded may be , , , , and possibly , if those reside in separate partitions. Consequently, i don't think that suggesting the  switch is a good advice.
 * Excluding, , , , , will give you a root directory devoid of these when you restore. I believe that those directories are needed for the (pseudo/virtual) file systems to get mounted: the mount operation will not create those missing dirs. So i'd think that you should use the trailing slash, followed by a wildcard, such as  instead of.

There exists a famous exclude list for backing up a complete system, a copy of which can be found at http://aplawrence.com/Bofcusm/2409.html. I used it as a template to get started.

My lists are, for the moment:

The "" and "" at the beginning of lines are not required. I like to have'em for if i choose to merge the and the  files into a, say,  file to be read by the  option. the option is more powerful than the combination of  and. The reason i use the two separate files is that i am using to manage the incremental backups. It makes use of rsync to do its job, and its config file proposes the use of the two separate files (yeah, i know, i can still use the option instead).

My command line has,  , , , and.

The reason for the option is for each user to have a  file. Mine has: -_/downloads/* -_/src/* - *.iso - *.divx This last file requires a "" or "" at the start of the line, followed by either a space, or an underscore (""), then the path.

--Harpette 11:24, 5 February 2010 (GMT)

This is one of the marvelous wonders of a wiki page. If somebody finds errors or optimizations, feel free to edit the page. Since it appears you have a further understanding of how rsync works, feel free to integrate "what works" for you. As for me, the simple rsync incantation "worked for me" in the past and I've yet to have any time to try anything else, especially since I rarely have any disk crashes lately. Granted, towards the later summertime, I'm sure my drives will over heat & fail. I've used the include/exclude lists and it appears to exclude as designated, but include /dev/console & /dev/null -- at least on my last usage(s). Since code sometimes change, rsync could be operating slightly different lately -- however, my understanding was similar to /etc/hosts.allow & /etc/hosts.deny. In other words, exclude all, but only include the two device files. As far as the separate virtual file system issues, you appear to have more of an understanding there. My intent was just to avoid including NFS filesystems!

Usually when I edit wiki pages, and if I'm not sure of something, I'll at least include a note within the main wiki page, instead of the conversation page -- or point to the conversation page relating to this possible conflict of interest with flags. This way, simple everyday readers will know to look at the additional information if it relates to their specific issue(s).

If you have time to further test something recursively, feel free to re edit the page accordingly. Your contributions will likely be useful to others as I doubt there are other better backup options aside from raid (which is some very specific downsides) and dd which recopies everything, while rsync only copies changed files. I've recently spent some time using Unison, but only on $HOME files and not as a sole full backup solution, as Unison is more of a two way syncing (for laptops, etc). As of yet, I see nothing as fast & effecient as Rsync.

Your wiki editing skills are far superior to my own editing skills... for just jotting notes, I couldn't imagine spending time wikifying my own notes! ;-)

roger 05:16, 19 February 2010 (GMT)