View Issue Details

IDProjectCategoryView StatusLast Update
0000575bareos-corefile daemonpublic2017-06-08 15:23
Reporterscrasa Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
PlatformWindows 2008 R2OSWindowsOS Version2008 R2
Product Version14.2.6 
Summary0000575: charset problem in symlinks/junctions windows restore
DescriptionWhere symlinks or junctions exists on windows that has non ascii chars (éäè ...), the backup is successfull, event in the director that run on linux the name is correctly printed, but when you restore these files, the chars seems translated to unicode chars (a symlink/junction named "testé" become "testé").
Steps To ReproduceWe use Windows 2008 R2 French edition for the filedaemon. Tested whit the 14.2.6 version. (same problem with a Windows 7 french edition)
The main director run on debian 8 (with charset UTF8),
14.2.1 (12 September 2014) x86_64-pc-linux-gnu debian Debian GNU/Linux 8.1 (jessie)

create folder/file with accent
use windows "mklink" commande without parameter to create symlinks to file et folder with names with accents
use windows "mklink" command with "/J" to create JUNCTION to folder with name with accent
backup/remove/restore you folder with your tests files

The file and folder with accents are correctly restored, but symlinks/junction name are not correct, even the name of the destination of the symlinks/junction are wrong to, this restore broken symlink/junction files.

More the restore operation seems to make problem on the setting attribute to the symlink/junction it can't find :

Error: findlib/attribs.c:714 Error in win32_restore_file_attributes: file C:/test/testé1: ERR=the specified file is not found

The problem seems not happen with hardlinks (mklink /H).
TagsNo tags attached.

Relationships

child of 0000625 closedmaik Release bareos-15.2.3 
child of 0000584 closedjoergs Release bareos-14.2.7 

Activities

amelentjev

amelentjev

2015-12-03 10:42

reporter   ~0002024

The same problem with latest release of Bareos.
pstorz

pstorz

2015-12-10 12:11

administrator   ~0002033

Hello,

please verify if the packages in

http://download.bareos.org/bareos/people/pstorz/bug575/


solve the problems.

Thank you
amelentjev

amelentjev

2015-12-10 20:46

reporter   ~0002034

Last edited: 2015-12-10 20:54

Partially work. I've tested 32-bit version and cyrillic charactes in symlink/junction name. Made full backup&restore. Symbolic link restored correctly, but junction name was broken.

scrasa

scrasa

2015-12-11 16:22

reporter   ~0002036

almost same thing here. Names of symlink are correct, but redirection seems retargeted to Windows\system32. I use a director 14.2 and the filedaemon 15.2 you provided on the link. Perhaps the new problem of retargeting comes from here ...?


the folder with tests I backup (with JUNCTION, SYMLINKD, SYMLINK) :

Répertoire de C:\test-old

11.12.2015 15:51 <REP> .
11.12.2015 15:51 <REP> ..
11.12.2015 15:33 <REP> testé
11.12.2015 15:33 0 testé.txt
11.12.2015 15:51 <SYMLINKD> testé1 [testé]
11.12.2015 15:42 <SYMLINK> testé1.txt [testé.txt]
11.12.2015 15:42 <JONCTION> testé2 [C:\test\testé]
               2 fichier(s) 0 octets
               5 Rép(s) 13'791'985'664 octets libres


The forlder I restore with fixed version 15.2 of filedaemon on client (name of symlink ok but redirected to system32 ...) :

 Répertoire de C:\test-fix

11.12.2015 15:51 <REP> .
11.12.2015 15:51 <REP> ..
11.12.2015 15:55 <JONCTION> testé2 [\??\C:\test\testé\]
11.12.2015 15:33 <REP> testé
11.12.2015 15:33 0 testé.txt
11.12.2015 15:51 <SYMLINKD> testé1 [\\?\C:\Windows\system32\testé]
11.12.2015 15:42 <SYMLINK> testé1.txt [\\?\C:\Windows\system32\testé.txt]
               2 fichier(s) 0 octets
               5 Rép(s) 13'791'985'664 octets libres


The folder I restore with not fixed versions 14.2 on client and on director (names wrong but not retargeted) :

 Répertoire de C:\test-nofix

11.12.2015 15:51 <REP> .
11.12.2015 15:51 <REP> ..
11.12.2015 16:02 <SYMLINKD> testé1 [testé]
11.12.2015 16:02 <SYMLINK> testé1.txt [testé.txt]
11.12.2015 16:02 <JONCTION> testé2 [\??\C:\test\testé\]
11.12.2015 15:33 <REP> testé
11.12.2015 15:33 0 testé.txt
               2 fichier(s) 0 octets
               5 Rép(s) 13'791'981'568 octets libres
mvwieringen

mvwieringen

2015-12-24 15:00

developer   ~0002062

Fix committed to bareos bareos-15.2 branch with changesetid 6022.
mvwieringen

mvwieringen

2016-07-08 14:34

developer   ~0002306

Fix committed to bareos bareos-14.2 branch with changesetid 6410.

Related Changesets

bareos: bareos-15.2 b3bd1f52

2015-12-24 11:15

mvwieringen

Ported: N/A

Details Diff
win32: Fix symlink and junction support

Add support for CreateSymbolicLinkA and CreateSymbolicLinkW.
Seems there are again two types of calls one for wide strings and one
for ANSI ones. We also updated our CreateJunction function to be able
to handle wide strings instead of ANSI ones. We only implemented this
CreateJunction now for wide strings as junctions points are only
available for the public in Vista and later (and anything older is not
supported anyway anymore) why waste time on implementing an ANSI
version of it.

Fixes 0000575: charset problem in symlinks/junctions windows restore
Affected Issues
0000575
mod - src/win32/compat/compat.c Diff File
mod - src/win32/compat/winapi.c Diff File
mod - src/win32/include/winapi.h Diff File

bareos: bareos-14.2 e0d17d09

2015-12-24 11:15

mvwieringen

Ported: N/A

Details Diff
win32: Fix symlink and junction support

Add support for CreateSymbolicLinkA and CreateSymbolicLinkW.
Seems there are again two types of calls one for wide strings and one
for ANSI ones. We also updated our CreateJunction function to be able
to handle wide strings instead of ANSI ones. We only implemented this
CreateJunction now for wide strings as junctions points are only
available for the public in Vista and later (and anything older is not
supported anyway anymore) why waste time on implementing an ANSI
version of it.

Fixes 0000575: charset problem in symlinks/junctions windows restore
Affected Issues
0000575
mod - src/win32/compat/compat.c Diff File
mod - src/win32/compat/winapi.c Diff File
mod - src/win32/include/winapi.h Diff File

Issue History

Date Modified Username Field Change
2015-11-30 17:53 scrasa New Issue
2015-11-30 20:33 mvwieringen Status new => confirmed
2015-12-03 10:42 amelentjev Note Added: 0002024
2015-12-10 12:11 pstorz Note Added: 0002033
2015-12-10 12:11 pstorz Status confirmed => feedback
2015-12-10 20:46 amelentjev Note Added: 0002034
2015-12-10 20:52 amelentjev Note Edited: 0002034
2015-12-10 20:54 amelentjev Note Edited: 0002034
2015-12-11 16:22 scrasa Note Added: 0002036
2015-12-11 16:22 scrasa Status feedback => new
2015-12-18 13:14 mvwieringen Status new => confirmed
2015-12-24 15:00 mvwieringen Changeset attached => bareos bareos-15.2 b3bd1f52
2015-12-24 15:00 mvwieringen Note Added: 0002062
2015-12-24 15:00 mvwieringen Status confirmed => resolved
2015-12-24 15:00 mvwieringen Resolution open => fixed
2016-03-11 14:37 maik Relationship added child of 0000625
2016-07-05 11:56 joergs Relationship added child of 0000584
2016-07-08 14:34 mvwieringen Changeset attached => bareos bareos-14.2 e0d17d09
2016-07-08 14:34 mvwieringen Note Added: 0002306
2017-06-08 15:23 joergs Status resolved => closed