bugrdiff-backup - Bugs: bug #42319, NFS not preserving ownership...

 
 

bug #42319: NFS not preserving ownership causes hardlinks to report "Update mirror temp file ... does not match"

Submitter:  None
Submitted:  Thu 08 May 2014 01:49:58 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Ready For Test
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 20 May 2022 05:44:56 PM UTC, comment #3: 

This issue has been closed because it hasn't been touched for years, as the development continued on GitHub. If the issue is still present in a recent version, please re-open it under https://github.com/rdiff-backup/rdiff-backup/issues after having made that it's not already reported there.

Eric L. <ericzolf>
Group administrator
Fri 12 Feb 2016 09:05:44 AM UTC, comment #2: 

Patch needs testing on latest version.

david kempe <davekempe>
Group administrator
Thu 15 May 2014 09:48:27 PM UTC, comment #1: 

More details of the investigation I performed ...


All files reporting UpdateError have multiple hard links:

# ls -il /bin/{ed,red}
2752571 -rwxr-xr-x. 2 root root 10240 Apr 26 20:52 /bin/ed
2752571 -rwxr-xr-x. 2 root root 10240 Apr 26 20:52 /bin/red
# ls -il /lib/terminfo/v/{vt100,vt100-am}
1969383 -rw-r--r--. 2 root root 1194 Aug 18  2010 /lib/terminfo/v/vt100
1969383 -rw-r--r--. 2 root root 1194 Aug 18  2010 /lib/terminfo/v/vt100-am
# ls -il /lib/terminfo/v/vt2?0
1969382 -rw-r--r--. 2 root root 1279 Aug 18  2010 /lib/terminfo/v/vt200
1969382 -rw-r--r--. 2 root root 1279 Aug 18  2010 /lib/terminfo/v/vt220
# ls -il /sbin/dm*_tool
3014987 -rwxr-xr-x. 2 root root 13168 Jun 22  2012 /sbin/dm_dso_reg_tool
3014987 -rwxr-xr-x. 2 root root 13168 Jun 22  2012 /sbin/dmevent_tool
# ls -il /sbin/{fsck.ext*,e2fsck}
3014769 -rwxr-xr-x. 5 root root 197352 Nov 22 12:56 /sbin/e2fsck
3014769 -rwxr-xr-x. 5 root root 197352 Nov 22 12:56 /sbin/fsck.ext2
3014769 -rwxr-xr-x. 5 root root 197352 Nov 22 12:56 /sbin/fsck.ext3
3014769 -rwxr-xr-x. 5 root root 197352 Nov 22 12:56 /sbin/fsck.ext4
3014769 -rwxr-xr-x. 5 root root 197352 Nov 22 12:56 /sbin/fsck.ext4dev

etc.


Applied debugging patch to rdiff-backup which added extra logging messages into rpath.py equal_loose().  It being the function which triggers rdiff-backup to report "Update mirror temp file ... does not match source" errors.  The patch adds "Loose compare ..." log messages to report every the cause of every return path from the equal_loose().

(See attached: rdiff-backup-debug-causes-of-update-error-d1.patch
Not intended for applying upstream)

Log messages from rdiff-backup with verbose >= 7:

Sun May  4 14:41:54 2014  Processing changed file bin/red
Sun May  4 14:41:54 2014  Hard linking /mnt/autofs/backup/bin/rdiff-backup.tmp.1 to /mnt/autofs/backup/bin/ed
Sun May  4 14:41:54 2014  Loose compare ('bin', 'red') to ('bin', 'rdiff-backup.tmp.1'): user group mismatch: user_group.map_rpath(first)=(0, 0) != second.getuidgid()=(99, 99)
Sun May  4 14:41:54 2014  UpdateError bin/red Updated mirror temp file /mnt/autofs/backup/bin/rdiff-backup.tmp.1 does not match source
Sun May  4 14:41:54 2014  Deleting /mnt/autofs/backup/bin/rdiff-backup.tmp.1

Same "user group mismatch" issue for every UpdateError.


Identify that NFS share was not preserving uid and gids.  (See testing in earlier update).


Thanks,
Mike

(file #31383)

Anonymous
Thu 08 May 2014 01:49:58 PM UTC, original submission:  

After an OS upgrade, all changed files with multiple hard links failed to be backed up reporting "Update mirror temp file ... does not match".

E.g.
UpdateError bin/red Updated mirror temp file /mnt/autofs/backup/bin/rdiff-backup.tmp.1 does not match source
UpdateError lib/terminfo/v/vt100-am Updated mirror temp file /mnt/autofs/backup/lib/terminfo/v/rdiff-backup.tmp.341 does not match source
UpdateError lib/terminfo/v/vt220 Updated mirror temp file /mnt/autofs/backup/lib/terminfo/v/rdiff-backup.tmp.342 does not match source
UpdateError sbin/dmevent_tool Updated mirror temp file /mnt/autofs/backup/sbin/rdiff-backup.tmp.345 does not match source
UpdateError sbin/fsck.ext2 Updated mirror temp file /mnt/autofs/backup/sbin/rdiff-backup.tmp.346 does not match source
UpdateError sbin/fsck.ext3 Updated mirror temp file /mnt/autofs/backup/sbin/rdiff-backup.tmp.347 does not match source
UpdateError sbin/fsck.ext4 Updated mirror temp file /mnt/autofs/backup/sbin/rdiff-backup.tmp.348 does not match source
UpdateError sbin/fsck.ext4dev Updated mirror temp file /mnt/autofs/backup/sbin/rdiff-backup.tmp.349 does not match source

It is because I was backing up to an NFS share which didn't preserve uid and gids.  Instead they were all mapped to nobody.

    # cd /backup
    # touch foo
    # chown bin:bin foo
    # ls -l foo
    -rw-r--r--. 1 nobody nobody 0 May  7 20:52 foo

Chown reports succcess but, but on querying the uid and gid it always reported 99, 99 (nobody, nobody).  For single linked changed files I assume that rdiff-backup gets the uid/gid from the source.  However for an updated file with multiple hard links rdiff-backup creates the hard link on the destination and checks the uid/gid match the metadata.  This fails resulting in the "Updated mirror temp file" error message.

Fix by making rdiff-backup confirm the uid/gid actually changes when testing the backup destination before enabling the ownership changing ability.

Thanks,
Mike

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #31336:  rdiff-backup-confirm-chown-succeeded-v1.patch added by None (1KiB - text/x-patch - Fix: Confirm chown succeeds when testing backup destination abilities (v1))

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by ericzolf (Posted a comment)
  • -email is unavailable- added by davekempe (Posted a comment)
  • -email is unavailable- added by sliwowitz
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-05-20 ericzolf Open/ClosedOpen Closed
    2016-02-12 davekempe StatusNone Ready For Test
    2015-10-17 sliwowitz Carbon-Copy- Added sliwowitz
    2014-05-15 None Attached File- Added rdiff-backup-debug-causes-of-update-error-d1.patch, #31383
    2014-05-08 None Attached File- Added rdiff-backup-confirm-chown-succeeded-v1.patch, #31336

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code