Commit Graph
32 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 ac603a4d8f Renamed SourceFolders to SourceEntries as it can contain files as well 2025-02-18 22:32:37 +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 91ea81f537 Added commandline option to toggle locks 2024-10-08 09:35:00 +02:00
Marcelo Ceccon 7d6964b5b2 Simplified version of handling
Macos and Linux were working, ubuntu errors with 'close_nointr(fd) != -EBADF

It seems to be related to both FileStream behavior around closing handles when a SafeFilehandle is provided by an fopen call.
2024-10-04 10:40:39 +02:00
Marcelo Ceccon 3c7cba0927 Removing safehandle force dispose 2024-10-04 10:04:48 +02:00
Marcelo Ceccon 467a4434f9 Enforcing disposal and closure of filehandles. 2024-10-04 09:30:34 +02:00
Marcelo Ceccon dc91f3836a Another attempt to get the correct error code
Errors only manifest on macos action tests.
2024-10-03 21:21:34 +02:00
Marcelo Ceccon 0c4e10df9d Adding extended error detection if fopen fails 2024-10-03 19:50:56 +02:00
Marcelo Ceccon cd513ef53a Proposed change to open locked files on linux
This makes it unnecessary to use DOTNET_SYSTEM_IO_DISABLEFILELOCKING on environment variables.

Relevant issue: https://github.com/duplicati/duplicati/issues/5569
2024-10-03 16:34:49 +02:00
Jojo-1000 1dc1fd83af Add SupportedOSPlatform attribute and target windows where appropriate. 2024-05-30 01:22:16 +02:00
Kenneth Skovhede d3d4fc1434 More cleanup after using Mono.Posix 2024-03-01 14:30:28 +01:00
Kenneth Skovhede 40dd3c6816 Updated all license mentions to MIT 2024-02-28 15:45:30 +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 40dc6da81d Created separate package for io wrapper. 2018-10-25 20:01:55 +02:00
Daniel Gehriger 6ce298b4af Fixed USN in conjunction with snapshots on Windows 2018-04-22 23:37:45 +02:00
Daniel Gehriger 2c1a0ddb4e Implemented backup based on changes recorded in NTFS USN journal 2018-04-19 22:59:28 +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 ab489d9a28 Make parameter names in XML documentation match code. 2017-12-09 18:42:30 -08:00
Kenneth Skovhede 1f7110503a Updated unix symlinks handling to store correct metadata for symlinks 2016-11-03 13:11:53 +01:00
Kenneth Skovhede b9aacdd243 Changed to manually normalizing the path as Syste.IO.GetFullPath can return the trailing slash on some versions of Mono and that breaks reporting symlinks.
This new normalization also handles the POISX filesystem root path ("/").
2016-03-31 23:05:30 +02:00
Macho Philipovich 19dca2b69b support for / filesystem source by largely eliminating DIR_SEP variable + renamed license for case 2016-01-12 16:03:20 -05:00
Kenneth Skovhede 8d13e698eb Updated copyright notices 2015-01-20 21:44:52 +01:00
Kenneth Skovhede e3c6682d29 Improved handling of metadata, especially on Linux/OSX 2014-11-06 01:23:31 +01:00
Kenneth Skovhede b1ce24d504 Added hardlink detection on Linux/OSX 2014-04-02 11:02:06 +02:00
Kenneth Skovhede 26be8628cd Added support for detecting block devices under OSX/Linux.
Added support for reading extended attributes under OSX/Linux
2013-09-08 00:37:49 +02:00
Kenneth Skovhede 232a4aef7e Whitespace update 2013-08-30 20:44:53 +02:00
kenneth@hexad.dk a0521da54d Initial version of the new block-based storage format.
Still needs a work over in terms of error handling, progress reporting, warning output, refactoring etc.
Also misses the volume reuse/reclaim algorithms.
But it passes the unit tests now, with and without a local database.

git-svn-id: https://duplicati.googlecode.com/svn/sandboxes/Kenneth/ForestHash@1526 59da171f-624f-0410-aa54-27559c288bec
2013-02-12 21:43:14 +00:00