Re: Copying Group & Owner Permissions - Not On Replica

"'Brian Spraker' via unison-users" <[email protected]> Fri, 21 Mar 2025 14:04:19 +0000 (UTC)
Newsgroups gmane.network.unison.general
Message-ID <[email protected]>
 Thank you for the reply.
Since I was getting a ton of errors about the user not existing, I set the "owner" and "group" to false.  When changing to "true" is when all of the 'no user' errors occur with every file props transfer.
As you said, unison is being run as root so it has full access to all files.
The backup works great to an older platter hard drive on the same server and it copies over permissions, owner, and group info.  But that is because it is just a different hard drive on the same server.
Never can have two many backups so that is why I'd like to do both an onside (if just hard drive failure) or offsite (in case a major disaster).
So if I understand your reply, if I add "numericids" to the PRF file and set to true, that should essentially replicate what I'm after for owner and group data?


    On Friday, March 21, 2025 at 08:39:02 AM CDT, Greg Troxel <[email protected]> wrote:  
 
 "'Brian Spraker' via unison-users" <[email protected]> writes:

> Running Unison 2.53.4.Running Ubuntu servers.
> Background:
> I have a PRF file with the settings to do a replica sync.  Essentially the purpose of the sync is to back up all home folders on the server to a backup server that is offsite.
> I have these items in the PRF file:
> auto = truebatch = trueowner = falsegroup = falsetimes = truefastcheck = trueforce = /home
> Problem:
> The replica server is just a basic Ubuntu server install.  The users that are on the main server do not exist on the backup server.
> Therefore when replicating, none of the owner and group information copies over because they don't exist.
> Is there any way to force it?  Or a way to just force the user/group number?
> The concern is if the main server's drive fails, I would be able to copy the user data from the backup server - but I will then have to set all of the ownership data manually.

Are you running unison as root?

You have owner=false.  The man page says that means don't sync owner,
and then (well before really) it talks about numeric ids:

    numericids
            When this flag is set to true, groups and users are synchronized
            numerically, rather than by name. The special uid 0 and the
            special group 0 are never mapped via user/group names even if
            this preference is not set.

    owner  When this flag is set to true, the owner attributes of the files
            are synchronized. Whether the owner names or the owner
            identifiers are synchronizeddepends on the preference numerids.



Separately, I don't think using unison for backup is a good idea.  What
I want is to store a snapshot of the state, and then later to have
additional snapshots, not discarding the earlier ones.  There is disk
failure, blocks going bad, fs scrambled, compromised system, and surely
other problems.  Replicating the current state weekly means that a fault
more than a week ago that was not detected in time is trouble.

That leads to wanting deduplication, for both space and time.  My
backup solution of choice is bup, but I can see that it's a little
hard to deal with for many.  There are other programs that are somewhat
similar, but I'm not familiar with them enough to recommend for (or
against).

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

  

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].