I found this helpful re /3:
https://serverfault.com/questions/373058/comparing-owners-and-permissions-of-content-of-two-folders

If there's any gotchas that jump out - jump on in.
M

On 08/12/2024 2:28 pm, Morgan Read wrote:
Hello List,

I've been running rsync for must be 20 years by now, but over that time the holes in the Swiss cheese that passes for my brain seem to have grown larger and been filled with budgie seed and sawdust.

I once used rsync as my regular backup solution but now settle for a borg backend with pika up front and perhaps the lack of regular use caused me to run:
`[admin@server mymachine-home]$ rsync -aAX root@192.168.1.141:/home/ .`
And, after doing what I needed to do with /home on mymachine, I put it all back:
`[admin@server mymachine-home]$ rsync -avAX . root@192.168.1.141:/home/`
Only to discover - obviously in hindsight - that I'd failed to run as root and now the whole of /home (appears) to belongs to `admin` (a user that doesn't exist on mymachine).

So, my strategy:
1/ Assume that the wrong owner is the only problem thown up by the above - is that assumption correct?
2/ Recursively chown each users home directory to their corect owner;
3/ Use borg/ pika to mount a recent backup and diff the ownership between the backup and respective home directory to discover anything owned by something other than the respective user - and labouriously correct.

I wonder if anyone would be good enough to confirm whether or not the above sounds like a reasonable strategy?

Very many thanks for listening.

M

--
Morgan Read
Grande Bretagne

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Reply via email to