All data streams of all unencrypted files, including the unnamed data stream as
well as all named data streams.
.IP \[bu]
-Reparse points, including symbolic links, junction points, and other reparse
-points.
+Reparse points. See \fBREPARSE POINTS AND SYMLINKS\fR for details.
.IP \[bu]
File and directory creation, access, and modification timestamps, using the
native NTFS resolution of 100 nanoseconds.
The sparse attribute on sparse files will be saved, but the data stored will be
the full data of the file rather than the "sparse" data. (The data is, however,
subject to the WIM format's compression.)
+.IP \[bu]
+Some types of reparse points are transparently dereferenced by Windows but not
+by NTFS-3G. See \fBREPARSE POINTS AND SYMLINKS\fR.
.SH DIRECTORY CAPTURE (WINDOWS)
On Windows, \fBwimlib-imagex capture\fR and \fBwimlib-imagex append\fR
natively support Windows-specific and NTFS-specific data. They therefore act
.IP \[bu] 4
All data streams of all files.
.IP \[bu]
-Reparse points, including symbolic links, junction points, and other reparse
-points, if supported by the source filesystem. (Note: see \fB--rpfix\fR and
-\fB--norpfix\fR for documentation on exactly how absolute symbolic links and
-junctions are captured.)
+Reparse points, if supported by the source filesystem. See \fBREPARSE POINTS
+AND SYMLINKS\fR for details.
.IP \[bu]
File and directory creation, access, and modification timestamps. These are
stored with Windows NT's native timestamp resolution of 100 nanoseconds.
name contains certain characters considered invalid by Windows. If you run into
problems archiving such files consider using the \fBNTFS VOLUME CAPTURE
(UNIX)\fR mode from Linux.
+.SH REPARSE POINTS AND SYMLINKS
+A "symbolic link" (or "symlink") is a special file which "points to" some other
+file or directory. On Windows, a "reparse point" is a generalization of a
+symlink which allows access to a file or directory to be redirected in a more
+complex way. Windows uses reparse points to support symlinks, and sometimes
+uses them for various other features as well. Normally, applications can choose
+whether they want to "dereference" reparse points and symlinks or not.
+.PP
+The default behavior of \fBwimcapture\fR is that reparse points and symlinks are
+\fInot\fR dereferenced, meaning that the reparse points or symlinks themselves
+are stored in the archive rather than the files or data they point to. There is
+a \fB--dereference\fR option, but it is currently only supported by the UNIX
+version of \fBwimcapture\fR on UNIX filesystems (it's not yet implemented for
+Windows filesystems).
+.PP
+Windows also treats certain types of reparse points specially. For example,
+Windows applications reading from deduplicated, WIM-backed, or system-compressed
+files always see the dereferenced data, even if they ask not to. Therefore,
+\fBwimcapture\fR on Windows will store these files dereferenced, not as reparse
+points. But \fBwimcapture\fR on UNIX in NTFS-3G mode cannot dereference these
+files and will store them as reparse points instead. This difference can be
+significant in certain situations, e.g. when capturing deduplicated files which,
+to be readable after extraction, require that the chunk store also be present.
.SH OPTIONS
.TP 6
\fB--boot\fR
struct ntfs_volume_wrapper {
ntfs_volume *vol;
size_t refcnt;
+ bool dedup_warned;
};
/* Description of where data is located in an NTFS volume */
return 0;
}
+
+static void
+warn_special_reparse_points(const struct wim_inode *inode,
+ const struct scan_params *params,
+ struct ntfs_volume_wrapper *volume)
+{
+ if (inode->i_reparse_tag == WIM_IO_REPARSE_TAG_DEDUP &&
+ (params->add_flags & WIMLIB_ADD_FLAG_WINCONFIG) &&
+ !volume->dedup_warned)
+ {
+ WARNING(
+ "Filesystem includes files deduplicated with Windows'\n"
+" Data Deduplication feature, which to properly restore\n"
+" would require that the chunk store in \"System Volume Information\"\n"
+" be included in the WIM image. By default \"System Volume Information\"\n"
+" is excluded, so you may want to use a custom capture configuration\n"
+" file which includes it.");
+ volume->dedup_warned = true;
+ }
+}
+
static int
attr_type_to_wimlib_stream_type(ATTR_TYPES type)
{
volume, AT_REPARSE_POINT);
if (ret)
goto out;
+
+ warn_special_reparse_points(inode, params, volume);
}
/* Load the object ID. */
char *path;
int ret;
- volume = MALLOC(sizeof(struct ntfs_volume_wrapper));
+ volume = CALLOC(1, sizeof(struct ntfs_volume_wrapper));
if (!volume)
return WIMLIB_ERR_NOMEM;
return WIMLIB_ERR_INVALID_REPARSE_DATA;
}
+ if (le32_to_cpu(rpbuf.rptag) == WIM_IO_REPARSE_TAG_DEDUP) {
+ /*
+ * Windows treats Data Deduplication reparse points specially.
+ * Reads from the unnamed data stream actually return the
+ * redirected file contents, even with FILE_OPEN_REPARSE_POINT.
+ * Deduplicated files also cannot be properly restored without
+ * also restoring the "System Volume Information" directory,
+ * which wimlib excludes by default. Therefore, the logical
+ * behavior for us seems to be to ignore the reparse point and
+ * treat the file as a normal file.
+ */
+ inode->i_attributes &= ~FILE_ATTRIBUTE_REPARSE_POINT;
+ return 0;
+ }
+
if (params->add_flags & WIMLIB_ADD_FLAG_RPFIX) {
ret = winnt_try_rpfix(&rpbuf, &rpbuflen, full_path, params);
if (ret == RP_FIXED)