[Bug 1381494] [NEW] Full backup may not back up all files on Samba share yet report success

Mikko Kortelainen mikko at techelp.fi
Wed Oct 15 12:20:21 UTC 2014


Public bug reported:

Due to a regression in smbclient apparently starting from version 3.6,
not all files may be backed up by a BackupPC full backup. Yet BackupPC
reports the backup as successful.

The first NT_STATUS_ACCESS_VIOLATION error in a particular directory
stops the backup for the given directory, so that subsequent files and
subdirectories in that directory are not backed up. The processing will
continue with the next same level or upper level directory. Depending on
the order, some files and subdirectories may not be backed up.

So for example, if a backup of a C$ share on a Windows host processes
files in alphabetical order, and C$/pagefile.sys gives the
NT_STATUS_SHARING_VIOLATION error, the C$/Program Files, C$/Users and
C$/Windows among other directories will not be backed up.

The backup is nevertheless shown as a full backup and not a partial one
in the BackupPC user interface. Looking at the error log, the user can
see NT_STATUS_SHARING_VIOLATION errors, but there is no indication that
the rest of the directory was skipped because of this. And a typical
Windows host will have a number of those errors just because of files
that are in use. So it is not immediately obvious that a potentially
large number of files were skipped. Only by browsing the resulting
backup, or perhaps comparing backup and source sizes, can the user
notice missing files.

A subsequent incremental backup may actually back up more files, as it
may exclude some of the ones with those errors. I actually came across
this bug by seeing incrementals back up much more files than full
backups. Incrementals get deleted after a week in the default
configuration, leaving partial full backups.

It is quite alarming to realize this bug may affect all users with the
default packages and default configuration who are backing up Samba
shares with locked files - practically any Windows target.

This is probably related to this Samba bug:

https://bugzilla.samba.org/show_bug.cgi?id=10605

That bug is tagged to Samba 3.6, but I have seen the same behaviour with
Samba 4.1.6 in Trusty. The best way to see this is to run the backup
command from the command line and see it die prematurely after the first
error in the root of the share.

A workaround to this issue is to downgrade smbclient to version 3.5.

** Affects: backuppc (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to backuppc in Ubuntu.
https://bugs.launchpad.net/bugs/1381494

Title:
  Full backup may not back up all files on Samba share yet report
  success

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/backuppc/+bug/1381494/+subscriptions



More information about the Ubuntu-server-bugs mailing list