forgot to run as root...

Morgan Read via rsync <[email protected]> Sun, 8 Dec 2024 14:28:20 +0000
Newsgroups gmane.network.rsync.general
Message-ID <[email protected]>
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-----

iQIzBAEBCAAdFiEEKo0IJ7RnPqjXDxsmMUuIfshwtkQFAmdVrQQACgkQMUuIfshw
tkTn+w//RfNR6H9cVvl6ZiaEYesMYFLs6k07GB7fI2khFo3fuY5Bl6Vsbqw4zDju
SySRahNu2AOsoyjy75sMYmFqMKYhmV3QxWR1Q81DGal9UWkqKCohRmbo9Ig6iI2b
/Cf1jjft30y8mKT89mnCpRR2NbvfSiP1QXhYOeQMy3QDiDjWEwQ/3IF7Gfm59VMB
z2X1+O9Mmlms69ty96AiqfMI3bSkYfSpZ3TCJyXmz6TyaMc97cDiKqus86nVqV9R
WFKNtiFqUYJ0chYrCP+YShjB7KIGC3GtKVTkVa3K298EPy5yB9FDY//I01UVYu+B
0be4L6BhuBs7XPLgSS0ooioVNnRF0OiItnqTXM8tjl7gGzT+WmUTGOe7sH+HsZyM
N+E/iOg9uKcUucetScbaJFowYlSmKyk3zsiZoEy0c9sStOcn2ClRdT9jLzlTp1y6
BcojUoGxqfPD0jVIz26VTEQl6kCDRYDl4YjnhGgfGBB3HF5sNnTKYPhjdwpHdR7x
HRoVgjcUXI6ze968L+rhJanAG7EBO4Z6AcobjhcCyI0AqHwDai8KzVwuroxZDZj5
WLzzxitelM7Pcm8XEcHWybFWiSFxMz0yze3IpQ5ydzrWW+QhfXl82HR3/59YKjvW
iUUH+LZMf2tB5FOK+Rd8J3z4snCrDyv9IiEflKlb/3XILwKlB/4=
=bZsz
-----END PGP SIGNATURE-----