Package: backuppc
Version: 3.3.1-3
Severity: important


I'm running backuppc 3.3.1-3 (from debian/testing) on Debian/Jessie.
When trying to backup through smb files and directories with umlauts in
its name, it will not backup those files, and the content of these
directories is ignored. When trying to debug the problem, I found that
the problem occurs only when starting through the web interface. When
triggering the backup from the command line on the backup server the
problem did not occur.

root@backup2:~# dpkg -l|grep backuppc
ii  backuppc                          3.3.1-3
  amd64        high-performance, enterprise-grade system for backing up PCs
root@backup2:~# dpkg -l|grep smbclient
ii  libsmbclient:amd64                2:4.2.10+dfsg-0+deb8u3
  amd64        shared library for communication with SMB/CIFS servers
ii  smbclient                         2:4.2.10+dfsg-0+deb8u3
  amd64        command-line SMB/CIFS clients for Unix

I'm aware of this post:
   https://sourceforge.net/p/backuppc/mailman/message/35035066/
and have set according to Oliver Freyd's posting
 LANG=en_US.UTF-8 in /etc/init.d/backuppc


I'm not sure whether this is a bug in backuppc or in the debian
packaging, so this message is posting to debian bugs and the
backuppc-users mailinglist.

I did a number of tests with various configuration options (see below),
but running the smb backup through the backuppc server fails to backup
files and directories with umlaut in its name. Does anyone know how to
fix this ?



######## check LANG ##############
locale is set to en_US.UTF8 for root as well as user "backuppc"


root@backup2:~# locale
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
root@backup2:~# locale^C
root@backup2:~# su -c locale backuppc
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

######## Test 0: preparation ##############

For testing I've set up on the windows machines some test files and
directories with Umlauts in it. So, when I do

  CLIENTHOST=mywindowsmachine.local
  su -c "smbclient //$CLIENTHOST/C$ -W IST -k -D
/Users/schloegl/test.backuppc -c -E -d 5 -c tarmode full -TcX -
\BOOTSECT.BAK "   backuppc >t5.tar
  tar xvf t5.tar

und run
#   find Users/
  Users/
  Users/schloegl
  Users/schloegl/test.backuppc
  Users/schloegl/test.backuppc/withUmlautÖtest
  Users/schloegl/test.backuppc/withUmlautÖtest/test..001.txt
  Users/schloegl/test.backuppc/withUmlautÖtest/testÖ.001.txt
  Users/schloegl/test.backuppc/noUmlaut
  Users/schloegl/test.backuppc/noUmlaut/test..001.txt
  Users/schloegl/test.backuppc/noUmlaut/testÖ.001.txt

# cat Users/schloegl/test.backuppc/withUmlautÖtest/testÖ.001.txt
test
test

which is fine, all other files test*.txt have the same content.


######## Test 4: Triggering the backup from the web interface
##############

htop shows these processes:

    0     0     0   5  4793 backuppc   20   0 65632 15980  3156 S  0.0
0.0  0:00.04 ├─ /usr/bin/perl /usr/share/backuppc/bin/BackupPC -d
 60.4     0  60.4  13  5145 backuppc   20   0 82932 26176  4380 S  7.1
0.1  0:00.89 │  ├─ /usr/bin/perl /usr/share/backuppc/bin/BackupPC_dump
-f mywindowsmachine.local
    0     0     0   7  5149 backuppc   20   0  231M 12932 10708 R 20.9
0.0  0:02.81 │  │  ├─ /usr/bin/smbclient //w7test012.ist.local/C$ -W IST
-k -N -E -d 5 -c tarmode full verbose -Tc - /Users/schloegl
35010   239 34771   8  5148 backuppc   20   0 64368 17460  4100 D 41.7
0.0  0:04.61 │  │  └─ /usr/bin/perl
/usr/share/backuppc/bin/BackupPC_tarExtract mywindowsmachine.local C$ 0
    0     0     0  11  4796 backuppc   30  10 46460 10048  3812 S  0.0
0.0  0:00.07 │  └─ /usr/bin/perl /usr/share/backuppc/bin/BackupPC_trashClean

And the files on the backup server are:

cat `ls -1td /var/lib/backuppc/pc/$CLIENTHOST/*/|head
-1`fC\$/fUsers/fschloegl/ftest.backuppc/fwithUmlautÖtest/ftestÖ.001.txt
cat:
/var/lib/backuppc/pc/w7test012.ist.local/111/fC$/fUsers/fschloegl/ftest.backuppc/fwithUmlautÖtest/ftestÖ.001.txt:
No such file or directory
root@backup2:~#
root@backup2:~# find `ls -1td /var/lib/backuppc/pc/$CLIENTHOST/*/|head
-1`fC\$/fUsers/fschloegl/ftest.backuppc
/var/lib/backuppc/pc/w7test012.ist.local/111/fC$/fUsers/fschloegl/ftest.backuppc
/var/lib/backuppc/pc/w7test012.ist.local/111/fC$/fUsers/fschloegl/ftest.backuppc/fnoUmlaut
ca
/var/lib/backuppc/pc/w7test012.ist.local/111/fC$/fUsers/fschloegl/ftest.backuppc/fnoUmlaut/fPaxHeader
/var/lib/backuppc/pc/w7test012.ist.local/111/fC$/fUsers/fschloegl/ftest.backuppc/fnoUmlaut/fPaxHeader/ftestÖ.001.txt
/var/lib/backuppc/pc/w7test012.ist.local/111/fC$/fUsers/fschloegl/ftest.backuppc/fnoUmlaut/fPaxHeader/attrib
/var/lib/backuppc/pc/w7test012.ist.local/111/fC$/fUsers/fschloegl/ftest.backuppc/fnoUmlaut/ftestÖ.001.txt
/var/lib/backuppc/pc/w7test012.ist.local/111/fC$/fUsers/fschloegl/ftest.backuppc/fnoUmlaut/attrib
/var/lib/backuppc/pc/w7test012.ist.local/111/fC$/fUsers/fschloegl/ftest.backuppc/fPaxHeader
/var/lib/backuppc/pc/w7test012.ist.local/111/fC$/fUsers/fschloegl/ftest.backuppc/fPaxHeader/fwithUmlautÖtest
/var/lib/backuppc/pc/w7test012.ist.local/111/fC$/fUsers/fschloegl/ftest.backuppc/fPaxHeader/attrib
/var/lib/backuppc/pc/w7test012.ist.local/111/fC$/fUsers/fschloegl/ftest.backuppc/fwithUmlautÖtest
/var/lib/backuppc/pc/w7test012.ist.local/111/fC$/fUsers/fschloegl/ftest.backuppc/attrib


Which means that the directory
  /Users/schloegl/test.backuppc.withUmlautÖtest/
is empty.

and file
  Users/schloegl/test.backuppc/noUmlaut/testÖ.001.txt
is corrupted.


root@backup2:~# cat
/var/lib/backuppc/pc/w7test012.ist.local/111/fC$/fUsers/fschloegl/ftest.backuppc/fnoUmlaut/ftestÖ.001.txt
root@backup2:~# hexdump -C
/var/lib/backuppc/pc/w7test012.ist.local/111/fC$/fUsers/fschloegl/ftest.backuppc/fnoUmlaut/ftestÖ.001.txt
00000000  00 00 00 00 00 00 00 00  00 00 00 00              |............|
0000000c


Moreover, some PaxHeader files are generated, which seem to be of no
use. At least the can not be used for retrieving the files through
downloading the ZIP or tar.gz file.



######## Test 2: using BackupPC_dump from command line  ##############

su -c "/usr/share/backuppc/bin/BackupPC_dump -f $CLIENTHOST" backuppc
started full dump, share=C$
xferPids 6069,6068
full backup complete
root@backup2:~# cat `ls -1td /var/lib/backuppc/pc/$CLIENTHOST/*/|head
-1`fC\$/fUsers/fschloegl/ftest.backuppc/fwithUmlautÖtest/ftestÖ.001.txt
test
test

That's fine.


######## Test 3: testing smbclient. tarExtract X C$ 3  ##############


# su -c "smbclient //$CLIENTHOST/C$ -W IST -k -D
/Users/schloegl/test.backuppc -c -E -d 0 -c tarmode full -TcX -
\BOOTSECT.BAK | /usr/share/backuppc/bin/BackupPC_tarExtract X C$ 3 "
backuppc
OS=[Windows 7 Professional 7601 Service Pack 1] Server=[Windows 7
Professional 6.1]
tar:316  tarmode is now full, system, hidden, noreset, quiet
tar:711  Total bytes received: 48
Unable to read attribute file
/var/lib/backuppc/pc/X/new/fC$/fUsers/fschloegl/ftest.backuppc/attrib
  create   755       0/0           0 Users/schloegl/test.backuppc/noUmlaut
Unable to read attribute file
/var/lib/backuppc/pc/X/new/fC$/fUsers/fschloegl/ftest.backuppc/fnoUmlaut/attrib
  pool     644       0/0          12
Users/schloegl/test.backuppc/noUmlaut/test..001.txt
Unable to read attribute file
/var/lib/backuppc/pc/X/new/fC$/fUsers/fschloegl/ftest.backuppc/fnoUmlaut/fPaxHeader/attrib
  create   644       0/0         146
Users/schloegl/test.backuppc/noUmlaut/PaxHeader/testÖ.001.txt
  pool     644       0/0          12
Users/schloegl/test.backuppc/noUmlaut/testÖ.001.txt
Unable to read attribute file
/var/lib/backuppc/pc/X/new/fC$/fUsers/fschloegl/ftest.backuppc/fPaxHeader/attrib
  create   755       0/0         141
Users/schloegl/test.backuppc/PaxHeader/withUmlautÖtest
  create   755       0/0           0
Users/schloegl/test.backuppc/withUmlautÖtest
Unable to read attribute file
/var/lib/backuppc/pc/X/new/fC$/fUsers/fschloegl/ftest.backuppc/fwithUmlautÖtest/fPaxHeader/attrib
  create   644       0/0         153
Users/schloegl/test.backuppc/withUmlautÖtest/PaxHeader/test..001.txt
Unable to read attribute file
/var/lib/backuppc/pc/X/new/fC$/fUsers/fschloegl/ftest.backuppc/fwithUmlautÖtest/attrib
  pool     644       0/0          12
Users/schloegl/test.backuppc/withUmlautÖtest/test..001.txt
  create   644       0/0         154
Users/schloegl/test.backuppc/withUmlautÖtest/PaxHeader/testÖ.001.txt
  pool     644       0/0          12
Users/schloegl/test.backuppc/withUmlautÖtest/testÖ.001.txt
Done: 6 errors, 4 filesExist, 48 sizeExist, 64 sizeExistComp, 8
filesTotal, 642 sizeTotal
root@backup2:~# cat
/var/lib/backuppc/pc/X/new/fC\$/fUsers/fschloegl/ftest.backuppc/fwithUmlautÖtest/ftestÖ.001.txt

x^+I-.��*��


This corrupts the file as well, but it has a different content than in
the previous case.
This might be important because the default configuration when starting
through the backuppc deamon runs  BackupPC_tarExtract with a compression
argument set to 3.


######## Test 4: testing smbclient. tarExtract X C$ 0  ##############

# su -c "smbclient //$CLIENTHOST/C$ -W IST -k -D
/Users/schloegl/test.backuppc -c -E -d 0 -c tarmode full -TcX -
\BOOTSECT.BAK | /usr/share/backuppc/bin/BackupPC_tarExtract X C$ 0 "
backuppc
OS=[Windows 7 Professional 7601 Service Pack 1] Server=[Windows 7
Professional 6.1]
tar:316  tarmode is now full, system, hidden, noreset, quiet
tar:711  Total bytes received: 48
  create   755       0/0           0 Users/schloegl/test.backuppc/noUmlaut
  create   644       0/0          12
Users/schloegl/test.backuppc/noUmlaut/test..001.txt
  create   644       0/0         146
Users/schloegl/test.backuppc/noUmlaut/PaxHeader/testÖ.001.txt
  create   644       0/0          12
Users/schloegl/test.backuppc/noUmlaut/testÖ.001.txt
  create   755       0/0         141
Users/schloegl/test.backuppc/PaxHeader/withUmlautÖtest
  create   755       0/0           0
Users/schloegl/test.backuppc/withUmlautÖtest
  create   644       0/0         153
Users/schloegl/test.backuppc/withUmlautÖtest/PaxHeader/test..001.txt
  create   644       0/0          12
Users/schloegl/test.backuppc/withUmlautÖtest/test..001.txt
  create   644       0/0         154
Users/schloegl/test.backuppc/withUmlautÖtest/PaxHeader/testÖ.001.txt
  create   644       0/0          12
Users/schloegl/test.backuppc/withUmlautÖtest/testÖ.001.txt
Done: 0 errors, 0 filesExist, 0 sizeExist, 0 sizeExistComp, 8
filesTotal, 642 sizeTotal
root@backup2:~# cat
/var/lib/backuppc/pc/X/new/fC\$/fUsers/fschloegl/ftest.backuppc/fwithUmlautÖtest/ftestÖ.001.txt

test
test

That's fine as well. Testing with "-d 5" is also fine.

Reply via email to