rsync - Management of UIDs and GIDs when reserved on a Remote system

Kevin Korb kmk at sanitarium.net
Mon May 18 13:54:37 MDT 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Rsync has 4 options for this...

1) Write all files as the owner and group that rsync is running as.
This is the default and the only possibility when not running as root
since only root can create files as a different UID.

2) Copy the user name and group name.  This is what you get when you
are running as root and use --owner --group or --archive.  This means
if the 2 systems have the same user name but with different UIDs rsync
will translate so that the files come out with the same user name and
group name on both systems if possible.  If the user name or group
name doesn't exist on the target system then the file/dir is created
with whatever UID or GID number regardless of whether it is in use by
another user or not.

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.

4) --fake-super.  This writes files like option #1 but also stores
what the owner and group name or numeric IDs should be in a user
xattr.  The same info about --numeric-ids applies.  Root access not
needed except during restore.

On 05/18/2015 02:52 PM, Michael wrote:
> Hi Wayne et al,
> 
> I've been using Linux for a little over a year now.
> 
> I'm making improvements to the English phrasing used by luckyBackup
> which uses rsync. English is my first language and I'm doing this
> so that I can, then, more accurately make translations for the
> Spanish language.
> 
> I would like to know how rsync would 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?
> 
> If so, how would a Restore operation function? Can rsync create a
> log, during a Backup, to record the newly allocated IDs, on the
> Remote system, so that they can be mapped back to the Source
> system?
> 
> 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

iEYEARECAAYFAlVaQ30ACgkQVKC1jlbQAQc58wCcDoGUwb6kotWfPYIL0UTeFhyV
BWsAoNPE2ghqQX4xqE8wDlWilYPsShLe
=nZpc
-----END PGP SIGNATURE-----


More information about the rsync mailing list