I've always found it useful to test my rsync syntax with a subset of the data 
or the --dry-run option first.  Various OS implement rsync a tiny bit 
differently.

There are a lot of good rsync tutorials online which have working examples.


Cathy
-- 
Cathy L. Smith
IT Engineer

Pacific Northwest National Laboratory
Operated by Battelle for the 
U.S. Department of Energy

Phone: 509.375.2687
Fax:       509.375.4399
Email: cathy.sm...@pnnl.gov

-----Original Message-----
From: plug-boun...@pdxlinux.org <plug-boun...@pdxlinux.org> On Behalf Of David 
Bridges
Sent: Wednesday, July 31, 2019 1:15 PM
To: plug@pdxlinux.org
Subject: Re: [PLUG] Copying to new host, excluding a directory tree

> Well, I'm the only human element involved and I have no problems.
> When
> synchronizing an entire directory there's never been an issue. What I 
> want to learn is how to exclude a specific subdirectory on the source 
> host.

In an earlier reply I mentioned using a file to exclude things that is 
referenced on the rsync command line.  I know that things can be excluded as an 
argument on the command line but I've been tripped up doing it like that in the 
past.  I would suggest trying the following using your correct information of 
course.

Create a file on the source node /home/rshepard/excludes.txt that includes the 
directory you want to exclude (in this case data no / needed), and possibly 
excludes.txt

The following should do what you want as it works prefectly for me with my 
specific directories and excludes.

rsync -arvP -e ssh --exclude-from='/home/rshepard/excludes.txt'
/home/rshepard/ rshepard@salmo:/home/rshepard/ 

I have files with commands resembling the one above on several computers which 
have worked for me for years.

Hope this helps

--
David


_______________________________________________
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug
_______________________________________________
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug

Reply via email to