Re: forgot to run as root...

Morgan Read via rsync <[email protected]> Sun, 8 Dec 2024 17:49:11 +0000
Newsgroups gmane.network.rsync.general
Message-ID <[email protected]>
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 [email protected]:/home/ .`
> And, after doing what I needed to do with /home on mymachine, I put it 
> all back:
> `[admin@server mymachine-home]$ rsync -avAX . [email protected]:/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

-- 
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
OpenPGP_signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEijfmBqmwBYcTDK931e3r0bDPUOIFAmdV3BcACgkQ1e3r0bDP
UOLKlxAAkXfUTO98wFFUM28mt4wcLHcI0KoP92852oR64flidA5QC7cPQoZb5FyD
NNNlrbaD2OlaQRZZd1aoIa8eu+vuWHIV1foyhZ/RihBv/XEDV+AkYXkmOAAMMani
GCJLNsiyUMDSUZQB2jzkkKFdwPMABIR75fgglK8sYgupXul/lJ0XofuhBuQMY75X
nHGDaXoSmIOFTHmgSu+thAzH7XA0yD7vwHhmE+SH02S772CG3994r9opUbKi7pQd
o8yQdteHSCf21EW9ou5pB2ChfnWd4sjgK7t1tZWlvrat5vMdhattaEsxAIHRIpeR
8RITpx6wh0q/pL8nzFKMxXNsGY5KlfJgKhJ10gkYurbQO9k4ErxrDpCXEAuWXKc0
aIcUOxlkNKHY3bFrUNvaSu9UKVJWYtTVwia9my7YkHSyU33Ta5behiEzC+Jqo8d5
OoBlhoHg4TwYs8lxtw1mQKSer9V8SDcEWQnfBP3AQF/4r1J1Lv5kqbuP0ntp3TWL
5FvZjqjOxe2A6UrhplbcdIy1CDPyI1pAdNqfEdpQmp8x8BdZ0yV6qpwHFe4UvCr8
1v+abNoXY5lIYkNH7AT1yu8VE98ZzVXFIyBEkkzZudL6E0dECm16/iVaCmOeYcMQ
gMx3o6wK+3QbiXYY2AAn0ecTvTlgc/eDNm89MU3/LbB3DSdv+uI=
=trZs
-----END PGP SIGNATURE-----