Commit Graph
103 Commits
Author SHA1 Message Date
Kenneth Skovhede 9dfe977d3f Changed logic so the source providers are now logically mounted into the source directory structure.
This fixes the restore issues as all sources will now appear as if they were originally part of the source file system.

The backend implementation has now been simplified so the backends only return names of entries with no path information.  Most backends already do this, but the S3 backends did not, so this was fixed as well.

This also clears up the interfaces, so the backend does not know about the `ISourceProviderEntry`. All mapping is done by the `BackendSourceProvider`, making it simpler to support other backends as sources.
2025-02-21 16:06:55 +01:00
Kenneth Skovhede cf5b4bb24d Added support for Wmic based Windows VSS snapshots.
Refactored code a bit to be easier to understand.
2025-02-19 14:00:14 +01:00
Kenneth Skovhede ac603a4d8f Renamed SourceFolders to SourceEntries as it can contain files as well 2025-02-18 22:32:37 +01:00
Kenneth Skovhede 12d0c9710d Added additional fix for VSS 2025-02-18 17:17:16 +01:00
Kenneth Skovhede f61a1d0ad8 Fixed Windows VSS support 2025-02-18 15:13:46 +01:00
Kenneth Skovhede 6bbc93b8df Merge remote-tracking branch 'origin/master' into feature/alternate-source-provider 2025-02-16 16:37:12 +01:00
Kenneth Skovhede 356d117b86 Ensure directory paths end with a separator 2025-02-16 16:08:28 +01:00
Kenneth Skovhede 8c935a7344 This creates a new ISourceProvider interface for describing a data source.
With this interface it is possible to wrap the current support for snapshots and USN and simplify the enumeration.

This makes a number of assumptions into fields such as `IsMetaEntry` and `IsRootEntry` that removes code that was checking for various properties.

This first commit has support for VSS and USN as well as "naked" files, keeping feature parity.

There is also an experimental support for loading a backend-as-a-source. The support for this is currently limited as the backends need to be extended to support a folder concept.
2025-02-09 16:14:22 +01:00
Kenneth Skovhede ebdfc774c2 Removed static IO_WIN and IO_SYS as cross-platform calls are not possible. 2025-02-06 16:57:12 +01:00
Kenneth SkovhedeandGitHub 9464caf622 Feature/update license 2025 (#5851)
* Fixed some minor whitespace issues

* Updated all copyright to 2025
2025-01-07 09:40:39 +01:00
Kenneth Skovhede 8c0e4329f7 Fixed additional ReadOnly issues 2024-09-18 11:39:26 +02:00
Jojo-1000 1dc1fd83af Add SupportedOSPlatform attribute and target windows where appropriate. 2024-05-30 01:22:16 +02:00
Kenneth Skovhede 69a6c09699 Added null guard for disposing (dispose should not throw) 2024-05-17 12:16:55 +02:00
Kenneth Skovhede 40dd3c6816 Updated all license mentions to MIT 2024-02-28 15:45:30 +01:00
Dean Ferreyra c50223eafe Renames relating to the extended device path prefix, \\?\ 2021-11-12 07:29:43 -08:00
warwickmmandGitHub 83318877a1 Merge pull request #4285 from dferreyra/source_path_with_unc_prefix_3
Handle Windows source paths starting with "\\?\"
2020-08-21 07:38:12 -07:00
Dean Ferreyra b8eecba62c Handle Windows source paths starting with "\\?\"
Under Windows, strip paths of any `\\?\` prefix to prevent Duplicati
from storing paths prefixed with `\\?\`.

This fixes an inconsistency in the stored data where, if the user
provided a prefixed path to back up (e.g., `\\?\C:\Temp`), Duplicati
would store an entry with the prefixed path (e.g., `\\?\C:\Temp`)
along with entries with paths stripped of their prefix (e.g.,
`C:\Temp\file.txt`).  By only storing non-prefixed paths, this also
avoids an error reported by the GUI when it would encounter a prefixed
path:
```
Filter for list-folder-contents must be a path prefix with no wildcards Parameter name: filter
```
2020-08-15 20:09:54 -07:00
Dean Ferreyra ecd62e8cea Fix snapshots broken by #4256
Add comment in `WindowsSnapshot.ConvertToSnapshotPath()` warning how
replacing some manual path construction code with Path.Combine() alone
can lead to invalid snapshot paths.
2020-08-08 15:32:54 -07:00
Dean Ferreyra 1198c10d43 Fix snapshots broken by #4256
Revert the change made to `WindowsSnapshot.ConvertToSnapshotPath()`
by pull request #4256.

The change in #4256 replaced some existing manual path construction
code with a call to `SystemIO.IO_WIN.PathCombine()`, but calling
`SystemIO.IO_WIN.PathCombine()` this way did not always result in
valid VSS paths.  For example, trying to back up a root volume like
"C:\" would result in the following error:
```
The filename, directory name, or volume label syntax is incorrect.
```
2020-08-07 21:51:11 -07:00
Dean Ferreyra d154702020 Support problematic Windows paths
Fix pull request string comparisons in SystemIOWindows.cs to use
StringComparison.Ordinal.

Fix pull request to use SystemIO.IO_WIN.PathCombine() in
WindowsSnapshot.cs.
2020-07-19 16:24:51 -07:00
Dean Ferreyra 6acbbf2136 Support problematic Windows paths
Allow historically problematic Windows paths (i.e., files or
directories that end in a dot or a space) to be backed up with
Duplicati in Windows.

This fixes #3839.
2020-07-17 21:50:29 -07:00
Kenneth Hsu 83ac03843d Fix spelling errors in comments.
In doing so, we also normalized some line endings.
2019-12-14 09:52:55 -08:00
verhoek 2051e0b272 Added null check for writers to include in vss (issue 3494).
Improved exception logging.
2018-11-13 21:04:34 +01:00
verhoek b2cc18426c Renamed Library.IO to Library.Common.IO.
Moved basic Platform functions to Library.Common.Platform.
Turned IO_OS into property within Library.Common.
2018-11-02 21:34:07 +01:00
verhoek 9fb38ebe9a Continuation of Util.DirectorySeparatorString replacements. 2018-11-02 17:48:17 +01:00
verhoek 0aa62975b7 Simplified ListFolders similarly to ListFiles. 2018-10-31 13:07:04 +01:00
verhoek bd3bb04f86 Restructed ListFiles to be more understandable. 2018-10-31 12:32:35 +01:00
verhoek dd74245b75 Handled GetFiles calls at risky spots in combination with PathTooLongExceptions. 2018-10-30 17:16:13 +01:00
verhoek a90f577624 Redirected GetDirectories calls to Library.IO's version. 2018-10-30 13:38:25 +01:00
verhoek 52916b935b Replaced System.IO.Path with wrapper call to Alphaleonis. 2018-10-28 12:08:09 +01:00
verhoek 87c158f8cc Clean ups. 2018-10-27 21:40:58 +02:00
verhoek 1bf1daa189 Moved alphaleonis stuff to VSS wrapper objects in Libary.IO. 2018-10-27 12:29:39 +02:00
verhoek 40dc6da81d Created separate package for io wrapper. 2018-10-25 20:01:55 +02:00
verhoek a3cc49566d Added additional wrappers for alphaFS implementations. 2018-10-25 17:02:35 +02:00
verhoek 7872018bbd Moved vss to SystemIOWindows. Added GetDirectories to ISystemIO. 2018-10-25 16:42:53 +02:00
verhoek 2e0fb275ea Moved GetPathRoot to SystemIOWindows instead of using AlphaFS directly. 2018-10-25 10:23:50 +02:00
Kenneth Hsu d4d1945faf Use utility method to append trailing slash.
This removes some duplicated code.
2018-09-22 10:19:45 -07:00
Kenneth Skovhede a5cfeff912 Removed the one-element cache to avoid potential race conditions.
Rewrote the path mapping to use simpler operations.
This is a potential fix for #3307
2018-08-14 14:42:51 +02:00
Kenneth Skovhede becf9f7307 Merge branch 'feature/fix-vss-on-drive' 2018-06-30 19:14:36 +02:00
Kenneth Skovhede 39ddebcdf5 Added a default to exclude the System State VSS writer.
This fixes #3236
2018-06-30 19:11:42 +02:00
Kenneth Skovhede 06d6352aca Tested and fixed the VSS mapping problem caused by using Path.Combine with a \?\\GLOBALROOT\ prefixed path. 2018-06-30 18:50:06 +02:00
Kenneth Skovhede bf14017eec Rewrote the logic for returning a VSS path for a locally mapped path to fix issues with using VSS on a drive directly 2018-06-29 10:35:37 +02:00
verhoek 30cd41585b Corrected spelling function name. 2018-05-16 20:08:40 +02:00
Kenneth Skovhede 2b54bb9415 Removed the redundant byte-array-to-string method from the MD5 module, and added a using directive.
Added some additional logging to better diagnose issues with VSS/LVM snapshots.
2018-05-09 10:44:32 +02:00
Daniel Gehriger 0b43c467c7 Merge remote-tracking branch 'upstream/master' into feature/usn 2018-04-25 17:19:13 +02:00
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
Daniel Gehriger 6ce298b4af Fixed USN in conjunction with snapshots on Windows 2018-04-22 23:37:45 +02:00
Daniel Gehriger 96d1390412 Disabling USN for now when snapshots are used - this will be enabled shortly 2018-04-20 09:44:48 +02:00
Daniel Gehriger 8af63b1d5d Fixed some of the issues reported by codacy. The others are incorrect warnings. 2018-04-20 09:17:06 +02:00
Daniel Gehriger 2c1a0ddb4e Implemented backup based on changes recorded in NTFS USN journal 2018-04-19 22:59:28 +02:00