Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We now support symlink-like objects on windows
Support was added for the following types of symlinks: - Symlinks on Files - Symlinks on Directories - Junction Points These are implemented in windows as Reparse Points. All these objects are treated like ordinary symlinks (FT_LNK) in bareos, also Junction Points and Symlinks on Directories which are directories in windows logic. The Information on what kind of symlink-like object we have is stored in the st_rdev member of the stat information. There we have now - FILE_ATTRIBUTES_JUNCTION_POINT - FILE_ATTRIBUTES_SYMBOLIC_LINK During Backup, the function "get_symlink_data" gets the information where the symlink/junction/volume mount points points to. During restore, the function "symlink" creates the symlink-like object. To be able to determine what kind of "symlink" needs to be created, it also gets the st_rdev information. Depending on what kind of symlink it needs to create it either calls the windows api function "CreateSymbolicLink" or the self-implemented Function "CreateJunction" The symlink target is not altered during restore, even if it is restored with a prefix (where), because this makes absolute links unusable. Fixes #314: On Windows 2008 and Windows 2012 the junction points / links are not backed up properly Signed-off-by: Philipp Storz <philipp.storz@bareos.com> Signed-off-by: Marco van Wieringen <marco.van.wieringen@bareos.com>
- Loading branch information
Oleg Livshyts
authored and
Marco van Wieringen
committed
Feb 17, 2015
1 parent
b619962
commit 8184f63
Showing
7 changed files
with
403 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.