Michael
2015-May-19 01:16 UTC
rsync - Management of UIDs and GIDs when reserved on a Remote system
Kevin Korb <kmk <at> sanitarium.net> writes:> > 3) --numeric-ids copies both as the number. This is what you normally > want for backups. This way you have the exact UID and GID stored on > the backups regardless of what those numbers mean to the backup > system. Just remember to use --numeric-ids when you restore. This is > especially important if you have to restore from a live environment > that has completely different UIDs and GIDs than your normal system. > That environment would have no idea how to translate names from option > #2 during a restore.Hi Kevin, Regarding the option --numeric-ids, how would rsync manage the situation where the UID and GID(s), of a file being copied to a Remote system, have been reserved on the Remote system. Does rsync search for and allocate the next available IDs? Thanks, Michael.
Kevin Korb
2015-May-19 01:26 UTC
rsync - Management of UIDs and GIDs when reserved on a Remote system
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 No, rsync would store the files with the numeric UID and GID as is on the source without regard to the existence or non-existence of a matching account. This could mean that ls would show numbers in those columns, or incorrect names in those columns, or (perhaps by coincidence) show the correct names in those columns. The important thing is that if you backup and restore with --numeric-ids you will get back what you started with regardless of what the backup system thinks about the data. On 05/18/2015 09:16 PM, Michael wrote:> Kevin Korb <kmk <at> sanitarium.net> writes: >> >> 3) --numeric-ids copies both as the number. This is what you >> normally want for backups. This way you have the exact UID and >> GID stored on the backups regardless of what those numbers mean >> to the backup system. Just remember to use --numeric-ids when >> you restore. This is especially important if you have to restore >> from a live environment that has completely different UIDs and >> GIDs than your normal system. That environment would have no idea >> how to translate names from option #2 during a restore. > > Hi Kevin, > > Regarding the option --numeric-ids, how would rsync manage the > situation where the UID and GID(s), of a file being copied to a > Remote system, have been reserved on the Remote system. Does rsync > search for and allocate the next available IDs? > > Thanks, Michael. > > >- -- ~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~ Kevin Korb Phone: (407) 252-6853 Systems Administrator Internet: FutureQuest, Inc. Kevin at FutureQuest.net (work) Orlando, Florida kmk at sanitarium.net (personal) Web page: http://www.sanitarium.net/ PGP public key available on web site. ~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~ -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlVakU4ACgkQVKC1jlbQAQe6AACcDo7ecpCTUgDJkxBlx05OJ57D pf8AniaeelYUKcJDl+Zl/xjGcYkcmjOW =nRGQ -----END PGP SIGNATURE-----
Simon Hobson
2015-May-19 08:10 UTC
rsync - Management of UIDs and GIDs when reserved on a Remote system
Kevin Korb <kmk at sanitarium.net> wrote:> No, rsync would store the files with the numeric UID and GID as is on > the source without regard to the existence or non-existence of a > matching account. This could mean that ls would show numbers in those > columns, or incorrect names in those columns, or (perhaps by > coincidence) show the correct names in those columns. The important > thing is that if you backup and restore with --numeric-ids you will > get back what you started with regardless of what the backup system > thinks about the data.Yes, that's what I do for my backups. Since the backup system doesn't have the same software (and hence S/W specific users) as the various systems I back up, it means a lot of files with numeric owner/group - and of course, some with seemingly strange ownership where the backup system has a different user/group for the same ID ! If you have to restore, then the system you restore to needs to have the same passwd and group files - which is not a problem when you are restoring files to the same machine, or restoring the entire machine (in which case the passwd and group files come back with the rest of the files during the restore. The problem is if you need to restore to a different machine - in that case you will have problems. There isn't an easy way round that. So you either use numeric IDs in which case the backup is the same as your source; or you don't, in which case you need to do some careful user-id and group-id management to avoid problems (ie ensure that the destination has a user and group name to match ever name used on every source) and rsync will match names.
Maybe Matching Threads
- rsync - Management of UIDs and GIDs when reserved on a Remote system
- rsync - Management of UIDs and GIDs when reserved on a Remote system
- rsync - Management of UIDs and GIDs when reserved on a Remote system
- Very slow to start sync with millions of directories and files
- rsync keeps writing files over