Update 2013-10-02: This issue has been resolved with BackupPC 3.3.0.
A number of people of reported issues backing up Windows hosts with SMB and BackupPC 3.2.1 on Ubuntu 12.04 precise. This is caused by a bug in Samba/smbclient since 3.6.x where excluded directories are still listed (even if they won’t be backed up). It has not yet been fixed, but there is a workaround: downgrade Samba to 3.5.x.
After some discussion in my last BackupPC post, I built Samba 3.5.11~dfsg-1ubuntu2.3 from Ubuntu 11.10 oneiric for precise using pbuilder.
You can now work around this problem by adding my repository to your BackupPC server and running:
sudo apt-get update sudo apt-get install smbclient=2:3.5.11~dfsg-1ubuntu2.3 samba-common=2:3.5.11~dfsg-1ubuntu2.3 samba=2:3.5.11~dfsg-1ubuntu2.3 libwbclient0=2:3.5.11~dfsg-1ubuntu2.3 samba-common-bin=2:3.5.11~dfsg-1ubuntu2.3 echo "smbclient hold" | sudo dpkg --set-selections
This will downgrade smbclient and its dependencies, and mark them held so APT won’t attempt to upgrade them.
The following Samba packages have been added to the precise repository, all version 3.5.11~dfsg-1ubuntu2.3, for amd64 and i386.
- libwbclient0
- libwbclient-dev
- samba
- samba-common
- samba-common-bin
- samba-dbg
- samba-doc
- samba-doc-pdf
- samba-tools
- smbclient
- swat
- winbind
Thanks to Mike Lerley for reporting this issue and helping test the workaround.
-
It may not be a “bug” in the smbclient. I believe the following from http://www.samba.org/samba/history/samba-3.6.0.html may be relevant. Note: I was unable to get my BackupPC working with the suggested option.
Changed security defaults
————————-Samba 3.6 has adopted a number of improved security defaults that will
impact on existing users of Samba.client ntlmv2 auth = yes
client use spnego principal = no
send spnego principal = noThe impact of ‘client ntlmv2 auth = yes’ is that by default we will not
use NTLM authentication as a client. This applies to the Samba client
tools such as smbclient and winbind, but does not change the separately
released in-kernel CIFS client. To re-enable the poorer NTLM encryption
set ‘–option=clientusentlmv2auth=no’ on your smbclient command line, or
set ‘client ntlmv2 auth = no’ in your smb.conf-
Yes, adding the option as you described didn’t work for me.
I “downgraded” the hard way by reinstalling the previous working version of Ubuntu server (11.10). My server is running under Hyper-V with a separate virtual disk for /var/lib/backuppc so other than the hassle of a fresh install, I’m back to a working state.
I’ll think about upgrading the OS again and then applying your downgrade, but it won’t happen right away. Your method would have been a lot easier than mine!
-
Any ideas? Thanks.
# apt-get install smbclient=2:3.5.11~dfsg-1ubuntu2.3
Reading package lists… Done
Building dependency tree
Reading state information… Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:The following packages have unmet dependencies:
smbclient : Depends: samba-common (= 2:3.5.11~dfsg-1ubuntu2.3) but 2:3.6.3-2ubuntu2.2 is to be installed
E: Unable to correct problems, you have held broken packages.
# apt-get remove samba-common
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following packages were automatically installed and are no longer required:
ttf-dejavu-extra libio-dirent-perl rrdtool linux-headers-3.2.0-24 libtime-modules-perl libarchive-zip-perl libdbi1 librrd4 linux-headers-3.2.0-24-generic
libfile-rsyncp-perl ttf-dejavu
Use ‘apt-get autoremove’ to remove them.
The following packages will be REMOVED:
backuppc samba-common samba-common-bin smbclient
0 upgraded, 0 newly installed, 4 to remove and 0 not upgraded.
After this operation, 63.4 MB disk space will be freed.
Do you want to continue [Y/n]? n
Abort.
-
From that command I get:
E: Version ‘2:3.5.11~dfsg-1ubuntu2.3’ for ‘smbclient’ was not found
E: Version ‘2:3.5.11~dfsg-1ubuntu2.3’ for ‘samba-common’ was not found
E: Version ‘2:3.5.11~dfsg-1ubuntu2.3’ for ‘samba’ was not found
E: Version ‘2:3.5.11~dfsg-1ubuntu2.3’ for ‘libwbclient0’ was not found
E: Version ‘2:3.5.11~dfsg-1ubuntu2.3’ for ‘samba-common-bin’ was not found-
disregard this.
Didn’t see the bit about adding your repo.
-
Hi There
The downgrading works well, thanks.
The line to “hold” the updates needs to be changed to:echo “smbclient hold” | sudo dpkg –set-selections
It as missing an ‘-‘ before the set-selections.
-
The ‘–‘ get converted to a single –
-
Thank You
This also solved a problem where backuppc would not work with paths that have spaces in them.
-
-
Thanks a million for providing these packages. I spent many hours trying to work around the problems described above. Applying your fix took all of five mins!
-
-
-
-
15 comments
Comments feed for this article
Trackback link: https://www.tolaris.com/2012/06/14/smb-and-backuppc-on-ubuntu-12-04/trackback/