berndbausch |
02-18-2021 06:31 AM |
Quote:
Originally Posted by dchmelik
(Post 6221581)
spaces (which I learned can still be backed up by escaping the slash twice.)
|
Well, by putting a backslash in front of the space, or quotes around the directory name.
Quote:
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?)
|
If you have more than a handful of directories you want to exclude, a file is the better approach. One directory per line, and I don't even think quotes or backslashes are needed (I am not sure; double-check this, please).
Quote:
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/directory1
|
If you start the rsync at /home/user/directory1, excluding directory2/directory3 has no effect indeed, because no directory with that name would be copied.
My last statement may be incorrect.
|