Commit Graph
19 Commits
Author SHA1 Message Date
Kenneth Skovhede e51e1b9e5a Implemented option to use exclude filenames to mark folders for exclusion by placing a specially named file inside 2018-04-24 11:25:37 +02:00
Tyler Gill 08e0708a95 Change Duplicati's handling of reparse points, so that not all reparse points are treated as symlinks.
This is inspired largely by the new (/ returning) feature of OneDrive in Windows 10 Fall Creator's Update, which downloads files on-demand.
A side effect of that change is that the OneDrive folder (and subfolders of it) are marked as reparse points, even though they are not technically standard symlinks.
With this change, a new extension method IsSymlink is added for ISnapshotService and ISystemIO, which checks both the file attributes (for reparse point) and the symlink target path (if null, the path is not treated as a symlink).
All places that previously checked only the file attributes have been updated to use either this method (or at least the same logic, in the case of the core BackupHandler file check).
One side effect of this change is that '--symlink-policy=store' no longer ignores empty symlinks - they are now treated as regular files.
If there are empty symlinks, they will now be backed up as if they were regular files, but I don't know what the conditions are that create symlinks like that, so this might not effect anything in practice.
2018-02-06 13:24:49 -07:00
Kenneth Hsu 8810e0130d Make string comparisons use ordinal (binary) sort rules.
These string comparisons should not be culture-aware.
2017-11-26 11:19:54 -08:00
Christian Schuerer-Waldheim 5b70b2ab21 Remove comment with got committed accidentally. 2016-12-14 10:58:37 +01:00
Christian Schuerer-Waldheim 7645182b7d Refactor PrefixWithUNC (reorder checks and use string constants) 2016-12-14 09:25:23 +01:00
Christian Schuerer-Waldheim 58a4150dd6 Return proper UNC prefix for server paths (\\server\share\). This fixes #2167, but restore view needs fixing (NullReferenceException in SearchFiles()). 2016-12-13 18:29:36 +01:00
Kenneth Skovhede 1f7110503a Updated unix symlinks handling to store correct metadata for symlinks 2016-11-03 13:11:53 +01:00
Kenneth Skovhede 59cc0005a3 Removed unused references and updated most libraries to come from NuGet sources instead of being provided in the thirdparty library 2016-01-29 10:47:39 +01:00
Kenneth Skovhede 3858de008b Added ArgumentException to list of exceptions that cause IO operations to pass to AlphaFS.
This closes #1380.
This closes #1451.
2015-09-04 13:13:44 +02:00
alabuzhev 14e10c886f Read files opened for writing 2015-07-19 18:14:26 +03:00
Kenneth Skovhede 94f8a829e4 Fixed an issue with file/directory access being swapped when reading metadata 2015-05-17 11:41:47 +02:00
Kenneth Skovhede a57494ec65 Fixed problems with access metadata on files with long filenames on Windows.
This solves #1307.
2015-03-04 16:53:16 +01:00
Kenneth Skovhede 8d13e698eb Updated copyright notices 2015-01-20 21:44:52 +01:00
Kenneth Skovhede 06e125d081 Made the restore of permissions non-default 2014-11-30 21:32:31 +01:00
Kenneth Skovhede 0b3fd68316 Implemented ACLs on Windows 2014-11-15 17:43:42 +01:00
Kenneth Skovhede e3c6682d29 Improved handling of metadata, especially on Linux/OSX 2014-11-06 01:23:31 +01:00
Kenneth Skovhede 0a4d7561e1 Added more convenience functions to the SystemIO namespace 2014-03-20 15:07:30 +01:00
Kenneth Skovhede aea7e8150e Support for long paths with restore 2014-03-18 11:00:35 +01:00
kenneth@hexad.dk b277f6325d Fairly large rewrite of how files and paths are handled.
This fixes issues #144, #577 and #320.

This update introduces a new options called "symlink-policy" that can be set to "store", "ignore" or "follow".
The default setting "store" means all symlinks are recorded as symlinks and recreated as symlinks on restore. This is chosen as default because it is the best replication of the actual disk contents.
Setting it to "ignore" simply means that no information is recorded about any symlinks.
And lastly, setting it to "follow" reverts to the previous default of treating symlinks as if they are normal files/folders.
Caveat: On Windows, you need Administrator privileges to create symlinks (when restoring), but not for reading them (on backup).

Since this change meant that the file attributes must be read, I also added support for the option "exclude-files-attributes", that can be used to ignore/exclude files with certain attributes, such as "hidden", "archive" or "encrypted".

Since I had to much about so much with getting the symlinks supported on Windows, I also added some extra logic to the Windows file handler, so it can now handle files and folders with up to 32k chars in the path. The logic is done so that the normal System.IO operations are used for paths with less than 260 characters (MAX_PATH), and on error or longer paths, the Win32 Unicode API is invoked. This should give maximal backwards compatibility and still allow backup and restore of files with long paths.

This commit also includes a BlockingQueue implementation that is supposed to make file/folder enumeration faster, but this has not been implemented because Duplicati depends on having a "whole world" view of the files and folders before running the backup (i.e. deeper changes required for this).


git-svn-id: https://duplicati.googlecode.com/svn/trunk@1381 59da171f-624f-0410-aa54-27559c288bec
2012-07-29 20:07:10 +00:00