SearchFAQMemberlist Log in
Reply to topic Page 1 of 1
Backup Wins using Samba 3 client with Chinese filename
Author Message
Post Backup Wins using Samba 3 client with Chinese filename 
Hi all,

I am trying to backup my windows machines using Amanda + Samba 3 client.
However, those files which are going to be backed-up contain chinese
characters as its filenames. I want to keep those files with chinese
filenames using UTF-8 encoding when backup to the tape, so I changed my
smb.conf with few line added :

-------- Start of smb.conf --------

dos charset = CP950
unix charset = UTF-8
display charset =UTF-8

-------- End of smb.conf --------

With the amanda using the following dump type :

-------- Start of amanda.conf --------

define dumptype wins-comp-tar {
program "GNUTAR"
comment "Windows Backup through smbclient with tar & gz"
options srvcompress, index
priority high
}

-------- End of amanda.conf --------

I can get the following e-mail report from Amanda :

-------- Start of report --------


These dumps were to tape VOL-01.
The next tape Amanda expects to use is: a new tape.

FAILURE AND STRANGE DUMP SUMMARY:
samba-server //machine/data lev 0 STRANGE


STATISTICS:
Total Full Daily
-------- -------- --------
Estimate Time (hrs:min) 0:01
Run Time (hrs:min) 3:11
Dump Time (hrs:min) 1:47 1:47 0:00
Output Size (meg) 2359.8 2359.8 0.0
Original Size (meg) 8266.7 8266.7 0.0
Avg Compressed Size (%) 28.5 28.5 --
Filesystems Dumped 1 1 0
Avg Dump Rate (k/s) 376.1 376.1 --

Tape Time (hrs:min) 1:22 1:22 0:00
Tape Size (meg) 2359.8 2359.8 0.0
Tape Used (%) 23.1 23.1 0.0
Filesystems Taped 1 1 0
Avg Tp Write Rate (k/s) 490.4 490.4 --

USAGE BY TAPE:
Label Time Size % Nb
VOL-01 1:22 2359.8 23.1 1


FAILED AND STRANGE DUMP DETAILS:

/-- samba-server //machine/data lev 0 STRANGE
sendbackup: start [samba-server://machine/data level 0]
sendbackup: info BACKUP=/usr/bin/smbclient
sendbackup: info RECOVER_CMD=/usr/bin/smbclient -f... -
sendbackup: info end
? short utf8 char
...
? short utf8 char
| tar: dumped 51349 files and directories
| Total bytes written: 8668286976
sendbackup: size 8465124
sendbackup: end
\--------


NOTES:
planner: Adding new disk samba-server://machine/data.
taper: tape VOL-01 kb 2416544 fm 1 [OK]


DUMP SUMMARY:
DUMPER STATS TAPER STATS
HOSTNAME DISK L ORIG-KB OUT-KB COMP% MMM:SS KB/s MMM:SS KB/s
-------------------------- ---------------------------------
------------
samba-server //machine/data 0 84651242416482 28.5 107:04 376.1 82:08
490.4

(brought to you by Amanda version 2.4.4p2)

-------- End of report --------

However, when I checked the index created, those chinese characters are
replaced by the following escape characters :

-------- Start of index file --------

/Web/\346\260\270\350\261\220\347\266\262\351\240\201-20040521.doc

-------- End of index file --------

When I try to use the retrieve using amrecover command, it shows :

amrecover> add *.doc
Added /Web/\346\260\270\350\261\220\347\266\262\351\240\201-20040521.doc
amrecover> extract

Extracting files using tape drive /dev/nst0 on host localhost.
The following tapes are needed: VOL-01

Restoring files into directory
/var/lib/amanda/DailySet1/index/samba-server/__machine_data
Continue [?/Y/n]? y

Extracting files using tape drive /dev/nst0 on host localhost.
Load tape VOL-01 now
Continue [?/Y/n/s/t]? y
EOF, check amidxtaped.<timestamp>.debug file on localhost.
amrecover: short block 0 bytes
UNKNOWN file
amrecover: Can't read file header
extract_list - child returned non-zero status: 1
Continue [?/Y/n/r]? y

However, even I want to extract a file with english character as its
filename, it also has some errors :

amrecover> add x.txt
Added /x.txt
amrecover> extract

Extracting files using tape drive /dev/nst0 on host localhost.
The following tapes are needed: VOL-01

Restoring files into directory /tmp
Continue [?/Y/n]? y

Extracting files using tape drive /dev/nst0 on host localhost.
Load tape VOL-01 now
Continue [?/Y/n/s/t]? y
tar: ./x.txt: Not found in archive
tar: Error exit delayed from previous errors
extract_list - child returned non-zero status: 2
Continue [?/Y/n/r]? n

Anything goes wrong, or what have I miss ??
Thanks in advance ~~!!

^_^

Post Backup Wins using Samba 3 client with Chinese filename 
On Wed, Jun 16, 2004 at 05:18:00PM +0800, Kenny Mok (Wing Fung) wrote:
Hi all,

I am trying to backup my windows machines using Amanda + Samba 3 client.
However, those files which are going to be backed-up contain chinese
characters as its filenames. I want to keep those files with chinese
filenames using UTF-8 encoding when backup to the tape, so I changed my
smb.conf with few line added :

-------- Start of smb.conf --------

dos charset = CP950
unix charset = UTF-8
display charset =UTF-8

-------- End of smb.conf --------



Does your samba handle the characters cleanly when used interactively?

I.e. can you manually invoke smbclient, peruse the remote shares,
and make tar archive of a directory tree containing normal** and
chinese chars and then cleanly untar it on the server?

jon


** Sorry for the reference to non-chinese chars as "normal",
implying chinese chars were not Smile) After I read what I had
typed I decided to not edit it and poke fun at myself.

--
Jon H. LaBadie jon < at > jgcomp.com
JG Computing
4455 Province Line Road (609) 252-0159
Princeton, NJ 08540-4322 (609) 683-7220 (fax)

Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
  


Magic SEO URL for phpBB