bareos2015: bareos-14.2 647b2617

Author Committer Branch Timestamp Parent
Oleg Livshyts mvwieringen bareos-14.2 2014-12-03 11:32 bareos-14.2 db73bf24 Pending
Affected Issues  0000314: On Windows 2008 and Windows 2012 the junction points / links are not backed up properly
Changeset 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 0000314: 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>
mod - src/filed/backup.c Diff File
mod - src/findlib/create_file.c Diff File
mod - src/findlib/find_one.c Diff File
mod - src/findlib/mkpath.c Diff File
mod - src/lib/attr.c Diff File
mod - src/win32/compat/compat.c Diff File
mod - src/win32/compat/include/compat.h Diff File