exclude folders from rsync
Hi all,
I have written an rsync linke Code:
rsync -Lrav -e ssh apa@test:/home/apa/ "$MOUNTPOINT/test/home/apa" || { doEmail 9; exit 1; } What I want is to exclude on file inside the /home/apa. Is it possible to exclude that ? How could I possible do that with the rsync? I would like to thank you for your reply Regards Alex |
did you read the man page of rsync? look for --exclude
|
man rsync
Code:
-C, --cvs-exclude |
Take in account that with -a, you have to include path in filter, I mean:
Code:
--filter '- /home/apa/*/' |
thanks.. but how I am going to combine exclude with the ssh ?
rsync -Lrav -e ssh apa@test:/home/apa/ -C apa@test:/home/apa/EXCLUDEME/ "$MOUNTPOINT/test/home/apa" || { doEmail 9; exit 1;} does not really work... any ideas? |
I use rsync with --exclude all the time, although I haven't used it with the ssh option. Based on my experience, though, I can guess the following modification:
From this Code:
rsync -Lrav -e ssh apa@test:/home/apa/ "$MOUNTPOINT/test/home/apa" || { doEmail 9; exit 1; } Code:
rsync -Lrav --exclude EXCLUDEME -e ssh apa@test:/home/apa/ "$MOUNTPOINT/test/home/apa" || { doEmail 9; exit 1; } |
[delete duplicate]
|
Quote:
Code:
rsync -Lrav --filter '- /home/apa/EXCLUDEME/' -e ssh apa@test:/home/apa/ "$MOUNTPOINT/test/home/apa" || { doEmail 9; exit 1;} |
Quote:
/home/apa/something/EXCLUDEME |
Quote:
|
Now I am getting the following message
Rsync warning: some files vanished before they could be transferred (code 24) I have googled it and I found that this is an okay warning. The only problem though is that makes my script to terminate since Quote:
How I can "ignore" the code 24 so my code in that case executes normally the lines below, that pretty much unmount the hard disk. Regards Alex |
for example something like this:
Code:
rsync .... |
How much vanished files warnings? Maybe add those files to the exclude list
|
Quote:
Alex |
Hey, sorry I thought that with ' -v ', rsync would print the vanished file names :/
Maybe this would work Code:
(rsync -Lrav -e ssh my@host:/home/my/ \ |
All times are GMT -5. The time now is 02:51 AM. |