Article 5EB0W rsync backup over network?

rsync backup over network?

by
dchmelik
from LinuxQuestions.org on (#5EB0W)
I'm trying to do a complicated rsync backup of a home directory on a local area network (LAN.) I need to exclude some directories but in some cases that doesn't work. Unfortunately some also have spaces (which I learned can still be backed up by escaping the slash twice.) I saw examples on various question & answer sites of how to exclude them but there was a lot of speculation and sloppy writing, so nothing there worked. I'm able to exclude directories one level in like /home/user/directory1 (can exclude directory1) but not multiple levels in like /home/user/directory1/directory2 (however I try to exclude directory2, even if it doesn't have spaces, it always gets copied.) What's the exact way to do that, or is there an easier way to list exclusions in an exclude_file.txt, --exclude-from=exclude_file.txt and what would be the format of such a file (also in the case of directories with spaces?)

My recent command was something like the following (in which /home/user/directory1/directory2/directory3 always was copied) (I did this in several steps.)

Code:rsync -av --info=progress2 --delete --exclude=directory2/directory3 sourcehost:/home/user/directory1/ /home/user/directory1latest?d=yIl2AUoC8zA latest?i=-NkKBWnILbI:6wMeCqm5DaE:F7zBnMy latest?i=-NkKBWnILbI:6wMeCqm5DaE:V_sGLiP latest?d=qj6IDK7rITs latest?i=-NkKBWnILbI:6wMeCqm5DaE:gIN9vFw-NkKBWnILbI
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments