On 20/08/17 11:16, Ralph Corderoy wrote:
Hi Tim,

what is the correct phrase to
stop rsync from copying the cache folder?
Hard to say what you're doing wrong without an example.
It works for me.

     $ find src | sort
     src
     src/bar
     src/bar/file1
     src/.cache
     src/.cache/file1
     src/file1
     src/foo
     src/foo/.cache
     src/foo/.cache/file1
     src/foo/file1
     $
     $ rsync -aciHAXS --exclude /.cache/ src/ dest
     cd+++++++++ ./
     >f+++++++++ file1
     cd+++++++++ bar/
     >f+++++++++ bar/file1
     cd+++++++++ foo/
     >f+++++++++ foo/file1
     cd+++++++++ foo/.cache/
     >f+++++++++ foo/.cache/file1
     $
     $ >src/foo/file2
     $ rsync -aciHAXS --exclude /.cache/ src/ dest
     .d..t...... foo/
     >f+++++++++ foo/file2
     $
     $ find -name .cache | sorV
     ./dest/foo/.cache
     ./src/.cache
     ./src/foo/.cache
     $

Cheers, Ralph.

Hi Ralph

Thanks, from what you posted I managed to get it working, it is basically my home folder I am backing up but I am trying to safe space on my disk by simply syncing those folders in my home folder that I will want if I lost my home folder on my main disk. I don't really need .thumbnails and .cache which were two of the biggest space takers I did not need.

To move this on slightly, once rsync has run I want compress the whole home folders (it copies it to another folder then compresses for storage), it is currently around 21gb but half of that is a video folder that I have which is 10gb in size, how do I exclude a folder from tar? I can see where you can choose files and patters *.ogg but the videos are various formats so it would be simpler to exclude the whole folder? is it as simple as --exclude=videofolder? Not sure I am reading the man page correctly


Tim


--
Next meeting:  Bournemouth, Tuesday, 2017-09-05 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue     / TO THE LIST OR THE AUTHOR

Reply via email to