Re: Backing up Windows shares.

Michael Stowe <[email protected]> Sun, 28 Sep 2025 17:44:33 +0000
Newsgroups gmane.comp.sysutils.backup.backuppc.general
Message-ID <01010199916d24d6-0ad1b18f-b7fa-4218-a044-eb41fd4e6e81-000000@us-west-2.amazonses.com>
On 2025-09-28 04:49, G.W. Haywood wrote:
> Hi there,
> 
> For many years BackupPC has offered the option of using using Samba's
> smbclient to back up Windows SMB shares.
> 
> Unfortunately it seems that in this use case there are multiple issues
> with smbclient, see for example from January 2019:
> 
> https://github.com/backuppc/backuppc/issues/252
> 
> Windows junctions can make it impossible to exclude things you want to
> exclude; one particular problem with smbclient is that excludes don't
> seem to work properly, and haven't done for some time.
> 
> The 'regex' option for smbclient's tarmode is (a) broken since about
> Samba 4.13, five years or more ago, and (b) deprecated in any case by
> the Samba team since Samba 4.2 was released in March 2015 - so I don't
> know if the option is ever likely to be fixed; one day it might simply
> disappear.  Although Samba is very actively developed, a regression
> reported on the Samba bugzilla in November 2022:
> 
> https://bugzilla.samba.org/show_bug.cgi?id=15229
> 
> has generated no response.  That may be because the 'r' option is, as
> noted, now deprecated by Samba.  A 'wontfix' would have helped, but I
> suspect that the lack of response from BackupPC developers to queries
> in the past by Samba team members might figure to some extent in the
> equation.  For the avoidance of doubt, I'm now the BackupPC maintainer
> and I want somehow to get this fixed for Windows users.
> 
> So I got to wondering if anyone here is using CIFS to mount Windows 10
> or Windows 11 SMB shares for BackupPC to read?  I'm sure it's possible
> (apparently a lot of people using older NAS devices do it) but I don't
> personally know anyone who's doing it.  It needs some administration
> to get it working because it's not enabled by default in later Windows
> versions, largely I think because of the potential security issues.
> 
> It seems to me that even though like anything else CIFS has security
> issues, CIFS access could be restricted to the BackupPC server which
> should eliminate the vast majority.  Using a remote mount would allow
> BackupPC to use tar instead of smbclient, thus eliminating the problem
> with excludes and potentially a bunch of other issues using smbclient.
> 
> Yet another alternative might be to use a different SMB client, but I
> know nothing about such clients except that at least one exists.  This
> would probably require quite a lot of development in BackupPC which to
> me makes it an unlikely candidate at least in the near term (i.e. the
> next few years) unless someone here wants to step up and do the work.
> 
> Comments welcome.  I can't test on anything more recent than a Win7 VM
> which I have kicking around from the days - sorry, years - when I
> supported Windows installations, thankfully now long past.

It's not just Windows junctions, but Windows file semantics that make 
smbclient (and CIFS) a second choice.  There are at least a couple 
rsync/Windows solutions out there, both of which use shadow volumes to 
align with Windows' own backup paradigms.  They also have the advantage 
of not requiring Windows shares at all, which (as you've noted) have 
fallen out of fashion.

There have been a handful of people who reported mounting Windows shares 
locally to back those up via BackupPC, but I recall the experience being 
slow and brittle and I'd be a little surprised if anybody continued with 
it.



_______________________________________________
BackupPC-users mailing list
[email protected]
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    https://github.com/backuppc/backuppc/wiki
Project: https://backuppc.github.io/backuppc/