D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] rsync error.. tries to copy Trash folder

 

On 05/11/17 13:26, M. J. Everitt wrote:
On 05/11/17 13:19, Julian Hall wrote:
Hi All,

Doing a weekly backup of my NAS by rsync I keep getting an error when
it tries to copy the Trash folder, which obviously I don't want it to
copy anyway:

rsync: opendir "/media/julian/DIANA/.Trash-1000" failed: Permission
denied (13)

I have tried excluding the specified folder as follows;

sudo rsync -aAXv /media/julian/CASSIOPEIA /media/julian/ARTEMIS/
--delete --exclude={/media/julian/CASSIOPEIA/.Trash-1000}

However it seems to ignore the exclusion. It's not a huge problem as
everything else copies properly, it's just an irritant.

Any thoughts please?

Kind regards,

Julian

Why the curly braces {} and not simply double-quote and escape the
exclude .. I suspect if you try to echo this 'parameter' to the console
it will tell you why its not parsing it ...

MJE
I just copied the syntax I found when researching the original command and that had the curly brackets. I have noticed now though that in the command for backing up / the excludes have '/etc/*' so I tried '/.Trash-1000/*' but that has not worked either.

I'm sorry, but I don't follow you with 'escape the exclude' and echoing the parameter?

Julian

--
The Mailing List for the Devon & Cornwall LUG
https://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/listfaq