Welcome! » Log In » Create A New Profile

smbclient tar problem with umlauts

Posted by Anonymous 
smbclient tar problem with umlauts
June 30, 2016 08:29AM
I've found a way to fix this in samba 4.2.10,
the smbclient tar errors "can't convert filename ... to UTF-8" happen
only if smbclient runs in a non-UTF8 locale, like the C locale.

I have LANG=en_US.UTF-8 in my shell, and smbclient works with umlauts in
filenames. If I set LANG=C, it fails.

It seems this has to do with smbclient now using libarchive (since 4.2
IMHO) to write a tar archive, the errors occur inside libarchive.

So after setting LANG=en_US.UTF-8 in /etc/init.d/backuppc startup
script, it worked ok.

Well, I had to patch Smb.pm like someone else has described here...

Best regards,

Oliver Freyd

Am 27.04.2016 um 10:18 schrieb karlis:
[quote]AFAIK no way to fix, only samba downgrade

How to downgrade Samba to 4.1.6 using apt-get
http://www.backupcentral.com/phpBB2/two-way-mirrors-of-external-mailing-lists-3/backuppc-21/issues-with-smb-shares-130329/#410878

I had to uninstall samba and smbclient together with backuppc first, then reinstall.

--You wrote--
Is there any other way to fix this in samba 4.8.3 the downgrading to 4.1.7 ?
If not, then how to get samba 4.1.7 via apt.-get ?

Best regards
Michael Zeh

+----------------------------------------------------------------------
|This was sent by karlis.irmejs < at > limbazi.lv via Backup Central.
|Forward SPAM to abuse < at > backupcentral.com.
+----------------------------------------------------------------------

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
BackupPC-users mailing list
BackupPC-users < at > lists.sourceforge.net
List: https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki: http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/

[/quote]
------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
BackupPC-users mailing list
BackupPC-users < at > lists.sourceforge.net
List: https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki: http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/
smbclient tar problem with umlauts
July 02, 2016 09:08AM
Could you please link how to patch the smb.pm ?
smbclient tar problem with umlauts
July 05, 2016 09:26AM
Hello,

here's the patch to make smbclient 4.2.10 work with backuppc:

diff -u Backuppc3.2.1/lib/BackupPC/Xfer/Smb.pm
BackupPC3/lib/BackupPC/Xfer/Smb.pm
--- Backuppc3.2.1/lib/BackupPC/Xfer/Smb.pm 2012-11-09
18:37:14.000000000 +0100
+++ BackupPC3/lib/BackupPC/Xfer/Smb.pm 2016-07-01 13:56:10.162250854 +0200
< at > < at > -230,7 +230,9 < at > < at >
$t->{byteCnt} += $2;
$t->{fileCnt}++;
$t->{XferLOG}->write("$_n") if ( $t->{logLevel} >= 1 );
- } elsif ( /^s*tar: dumped d+ files/ ) {
+ } elsif ( /^s*tar: dumped d+ files/
+ || /Total bytes received: d+/i
+ ) {
$t->{xferOK} = 1;
$t->{XferLOG}->write("$_n") if ( $t->{logLevel} >= 0 );
} elsif ( /^s*tar: restored d+ files/ ) {
< at > < at > -239,7 +241,7 < at > < at >
} elsif ( /^s*read_socket_with_timeout: timeout read. /i ) {
$t->{hostAbort} = 1;
$t->{XferLOG}->write("$_n") if ( $t->{logLevel} >= 0 );
- } elsif ( /^code 0 listing /
+ } elsif ( /^code 0 listing /
|| /^s*code 0 opening /
|| /^s*abandoning restore/i
|| /^s*Error: Looping in FIND_NEXT/i
< at > < at > -270,6 +272,7 < at > < at >
} elsif ( /^s*directory /i ) {
$t->{XferLOG}->write("$_n") if ( $t->{logLevel} >= 2 );
} elsif ( /smb: >/
+ || /^s*tar:d+/
|| /^s*added interface/i
|| /^s*tarmode is now/i
|| /^s*Total bytes written/i

As you see The first chunk accept the message "total bytes received"
as success, the last chunk ignores the other messages that start with
"tar:linenumber".

Sadly smbclient does no more send the number of files transmitted, so
one has to put
$Conf{BackupZeroFilesIsFatal} = 0;
into the config and live without this check.

That's it for now,

Oliver

Am 02.07.2016 um 18:08 schrieb megaram:
[quote]Could you please link how to patch the smb.pm ?

+----------------------------------------------------------------------
|This was sent by mail < at > megaram-group.de via Backup Central.
|Forward SPAM to abuse < at > backupcentral.com.
+----------------------------------------------------------------------

------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
BackupPC-users mailing list
BackupPC-users < at > lists.sourceforge.net
List: https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki: http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/

[/quote]
------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
BackupPC-users mailing list
BackupPC-users < at > lists.sourceforge.net
List: https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki: http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/
smbclient tar problem with umlauts
July 22, 2016 12:25AM
Hello,
I'm not very experienced, how do I apply the patch? My version of Samba is 4.3.9, and 3.3.1 backuppc.
thank you
Orazio
Il 05/07/2016 18:21, Oliver Freyd ha scritto:

[quote] [quote]Hello,

here's the patch to make smbclient 4.2.10 work with backuppc:

diff -u Backuppc3.2.1/lib/BackupPC/Xfer/Smb.pm
BackupPC3/lib/BackupPC/Xfer/Smb.pm
--- Backuppc3.2.1/lib/BackupPC/Xfer/Smb.pm 2012-11-09
18:37:14.000000000 +0100
+++ BackupPC3/lib/BackupPC/Xfer/Smb.pm 2016-07-01 13:56:10.162250854 +0200
< at > < at > -230,7 +230,9 < at > < at >
$t->{byteCnt} += $2;
$t->{fileCnt}++;
$t->{XferLOG}->write("$_n") if ( $t->{logLevel} >= 1 );
- } elsif ( /^s*tar: dumped d+ files/ ) {
+ } elsif ( /^s*tar: dumped d+ files/
+ || /Total bytes received: d+/i
+ ) {
$t->{xferOK} = 1;
$t->{XferLOG}->write("$_n") if ( $t->{logLevel} >= 0 );
} elsif ( /^s*tar: restored d+ files/ ) {
< at > < at > -239,7 +241,7 < at > < at >
} elsif ( /^s*read_socket_with_timeout: timeout read. /i ) {
$t->{hostAbort} = 1;
$t->{XferLOG}->write("$_n") if ( $t->{logLevel} >= 0 );
- } elsif ( /^code 0 listing /
+ } elsif ( /^code 0 listing /
|| /^s*code 0 opening /
|| /^s*abandoning restore/i
|| /^s*Error: Looping in FIND_NEXT/i
< at > < at > -270,6 +272,7 < at > < at >
} elsif ( /^s*directory /i ) {
$t->{XferLOG}->write("$_n") if ( $t->{logLevel} >= 2 );
} elsif ( /smb: >/
+ || /^s*tar:d+/
|| /^s*added interface/i
|| /^s*tarmode is now/i
|| /^s*Total bytes written/i

As you see The first chunk accept the message "total bytes received"
as success, the last chunk ignores the other messages that start with
"tar:linenumber".

Sadly smbclient does no more send the number of files transmitted, so
one has to put
$Conf{BackupZeroFilesIsFatal} = 0;
into the config and live without this check.

That's it for now,

Oliver

Am 02.07.2016 um 18:08 schrieb megaram:
[quote]Could you please link how to patch the smb.pm ?

+----------------------------------------------------------------------
|This was sent by mail < at > megaram-group.de ([email]mail < at > megaram-group.de[/email]) via Backup Central.
|Forward SPAM to abuse < at > backupcentral.com ([email]abuse < at > backupcentral.com[/email]).
+----------------------------------------------------------------------

------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
[url=http://sdm.link/attshape]http://sdm.link/attshape[/url]
_______________________________________________
BackupPC-users mailing list
BackupPC-users < at > lists.sourceforge.net ([email]BackupPC-users < at > lists.sourceforge.net[/email])
List: [url=https://lists.sourceforge.net/lists/listinfo/backuppc-users]https://lists.sourceforge.net/lists/listinfo/backuppc-users[/url]
Wiki: [url=http://backuppc.wiki.sourceforge.net]http://backuppc.wiki.sourceforge.net[/url]
Project: [url=http://backuppc.sourceforge.net/]http://backuppc.sourceforge.net/[/url]

[/quote]
------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
[url=http://sdm.link/attshape]http://sdm.link/attshape[/url]
_______________________________________________
BackupPC-users mailing list
BackupPC-users < at > lists.sourceforge.net ([email]BackupPC-users < at > lists.sourceforge.net[/email])
List: [url=https://lists.sourceforge.net/lists/listinfo/backuppc-users]https://lists.sourceforge.net/lists/listinfo/backuppc-users[/url]
Wiki: [url=http://backuppc.wiki.sourceforge.net]http://backuppc.wiki.sourceforge.net[/url]
Project: [url=http://backuppc.sourceforge.net/]http://backuppc.sourceforge.net/[/url]
[/quote] --

TecnoSistemi S.r.l.
Servizi informatici per Aziende e Studi

Orazio Di nino

Viale della Repubblica, 70 c/o Sviluppo Italia - 67039 Sulmona (AQ)
( Tel: 800194055 +39 0864 2508313 +39 0864 578509 7 Fax: +39 0864 2508312[/quote]
smbclient tar problem with umlauts
July 22, 2016 05:28AM
Hi Orazio, that patch looks old ... some of the corrections were already applied in 3.3.1, attached my Smb.pm with the corrections that make backups work for the same samba and backuppc version as yours, replace it (backup first, of course) and give it a try.
The two lines that matter...
233 } elsif ( /^s*tar: dumped d+ files/
234                        || /Total bytes received: d+/i

Neimar

Em 22/07/2016 04:06, Orazio Di nino escreveu:

[quote]
Hello,
I'm not very experienced, how do I apply the patch? My version of Samba is 4.3.9, and 3.3.1 backuppc.
thank you
Orazio
Il 05/07/2016 18:21, Oliver Freyd ha scritto:

[quote] [quote]Hello,

here's the patch to make smbclient 4.2.10 work with backuppc:

diff -u Backuppc3.2.1/lib/BackupPC/Xfer/Smb.pm
BackupPC3/lib/BackupPC/Xfer/Smb.pm
--- Backuppc3.2.1/lib/BackupPC/Xfer/Smb.pm 2012-11-09
18:37:14.000000000 +0100
+++ BackupPC3/lib/BackupPC/Xfer/Smb.pm 2016-07-01 13:56:10.162250854 +0200
< at > < at > -230,7 +230,9 < at > < at >
$t->{byteCnt} += $2;
$t->{fileCnt}++;
$t->{XferLOG}->write("$_n") if ( $t->{logLevel} >= 1 );
- } elsif ( /^s*tar: dumped d+ files/ ) {
+ } elsif ( /^s*tar: dumped d+ files/
+ || /Total bytes received: d+/i
+ ) {
$t->{xferOK} = 1;
$t->{XferLOG}->write("$_n") if ( $t->{logLevel} >= 0 );
} elsif ( /^s*tar: restored d+ files/ ) {
< at > < at > -239,7 +241,7 < at > < at >
} elsif ( /^s*read_socket_with_timeout: timeout read. /i ) {
$t->{hostAbort} = 1;
$t->{XferLOG}->write("$_n") if ( $t->{logLevel} >= 0 );
- } elsif ( /^code 0 listing /
+ } elsif ( /^code 0 listing /
|| /^s*code 0 opening /
|| /^s*abandoning restore/i
|| /^s*Error: Looping in FIND_NEXT/i
< at > < at > -270,6 +272,7 < at > < at >
} elsif ( /^s*directory /i ) {
$t->{XferLOG}->write("$_n") if ( $t->{logLevel} >= 2 );
} elsif ( /smb: >/
+ || /^s*tar:d+/
|| /^s*added interface/i
|| /^s*tarmode is now/i
|| /^s*Total bytes written/i

As you see The first chunk accept the message "total bytes received"
as success, the last chunk ignores the other messages that start with
"tar:linenumber".

Sadly smbclient does no more send the number of files transmitted, so
one has to put
$Conf{BackupZeroFilesIsFatal} = 0;
into the config and live without this check.

That's it for now,

Oliver

Am 02.07.2016 um 18:08 schrieb megaram:
[quote]Could you please link how to patch the smb.pm ?

+----------------------------------------------------------------------
|This was sent by mail < at > megaram-group.de ([email]mail < at > megaram-group.de[/email]) via Backup Central.
|Forward SPAM to abuse < at > backupcentral.com ([email]abuse < at > backupcentral.com[/email]).
+----------------------------------------------------------------------

------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
[url=http://sdm.link/attshape]http://sdm.link/attshape[/url]
_______________________________________________
BackupPC-users mailing list
BackupPC-users < at > lists.sourceforge.net ([email]BackupPC-users < at > lists.sourceforge.net[/email])
List: [url=https://lists.sourceforge.net/lists/listinfo/backuppc-users]https://lists.sourceforge.net/lists/listinfo/backuppc-users[/url]
Wiki: [url=http://backuppc.wiki.sourceforge.net]http://backuppc.wiki.sourceforge.net[/url]
Project: [url=http://backuppc.sourceforge.net/]http://backuppc.sourceforge.net/[/url]

[/quote] ------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
[url=http://sdm.link/attshape]http://sdm.link/attshape[/url]
_______________________________________________
BackupPC-users mailing list
BackupPC-users < at > lists.sourceforge.net ([email]BackupPC-users < at > lists.sourceforge.net[/email])
List: [url=https://lists.sourceforge.net/lists/listinfo/backuppc-users]https://lists.sourceforge.net/lists/listinfo/backuppc-users[/url]
Wiki: [url=http://backuppc.wiki.sourceforge.net]http://backuppc.wiki.sourceforge.net[/url]
Project: [url=http://backuppc.sourceforge.net/]http://backuppc.sourceforge.net/[/url]
[/quote] --

TecnoSistemi S.r.l.
Servizi informatici per Aziende e Studi

Orazio Di nino

Viale della Repubblica, 70 c/o Sviluppo Italia - 67039 Sulmona (AQ)
( Tel: 800194055 +39 0864 2508313 +39 0864 578509 7 Fax: +39 0864 2508312[/quote]

[quote]------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev[/quote]

[quote]_______________________________________________
BackupPC-users mailing list
BackupPC-users < at > lists.sourceforge.net ([email]BackupPC-users < at > lists.sourceforge.net[/email])
List: [url=https://lists.sourceforge.net/lists/listinfo/backuppc-users]https://lists.sourceforge.net/lists/listinfo/backuppc-users[/url]
Wiki: [url=http://backuppc.wiki.sourceforge.net]http://backuppc.wiki.sourceforge.net[/url]
Project: [url=http://backuppc.sourceforge.net/]http://backuppc.sourceforge.net/[/url]
[/quote] [/quote]
smbclient tar problem with umlauts
July 25, 2016 02:49AM
Hi Neymar , and thanks for the reply.
I replaced the SMB file you sent me, but it does not solve. there is always the error "No files dumped for share .....".
Do you have any other idea?
Thank you.
Orazio

Il 22/07/2016 14:26, Neimar Volpini ha scritto:

[quote]
Hi Orazio, that patch looks old ... some of the corrections were already applied in 3.3.1, attached my Smb.pm with the corrections that make backups work for the same samba and backuppc version as yours, replace it (backup first, of course) and give it a try.
The two lines that matter...
233 } elsif ( /^s*tar: dumped d+ files/
234                        || /Total bytes received: d+/i

Neimar[/quote]
smbclient tar problem with umlauts
July 25, 2016 03:13AM
On 25.07.16 12:31, Orazio Di nino wrote:
[quote]Hi Neymar , and thanks for the reply.
I replaced the SMB file you sent me, but it does not solve. there is always the error "No files dumped for share .....".
Do you have any other idea?
[/quote]
Did you set
$Conf{BackupZeroFilesIsFatal} = 0;

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
BackupPC-users mailing list
BackupPC-users < at > lists.sourceforge.net
List: https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki: http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/
smbclient tar problem with umlauts
July 25, 2016 03:50AM
Now....., and it works !!!.
Thank you all
Orazio

Il 25/07/2016 11:53, Alexander Moisseev ha scritto:

[quote] [quote]Did you set[/quote] --

TecnoSistemi S.r.l.
Servizi informatici per Aziende e Studi

Orazio Di nino

Viale della Repubblica, 70 c/o Sviluppo Italia - 67039 Sulmona (AQ)
( Tel: 800194055 +39 0864 2508313 +39 0864 578509 7 Fax: +39 0864 2508312[/quote]
Sorry, only registered users may post in this forum.

Click here to login