Commit Graph
133 Commits
Author SHA1 Message Date
Kenneth Skovhede 2beebb6086 Improve link detection on Windows
This PR adds a check that prevents performing link lookups on drive roots as this is reported to fail on some Windows versions.

The PR also makes a link lookup failure a warning instead of failing the restore process.
2026-03-03 10:06:53 +01:00
Kenneth Skovhede cf8ef437c9 Fixed an edge case where the code would attempt to create a parent folder outside the restore target prior to applying metadata 2026-02-05 15:17:14 +01:00
Carl Johnsen ec71bdaecd Merge branch 'master' into feature/duplicati-storage-backend 2025-11-20 11:01:41 +01:00
Kenneth Skovhede 1ea74a3c63 Updated to .NET10 2025-11-14 15:05:39 +01:00
Carl Johnsen 092b7e4664 Made FileEntry empty constructor public to allow for JSON deserialization 2025-11-10 16:33:25 +01:00
Carl Johnsen 0c328a5bee Removed whitespace 2025-11-10 16:32:53 +01:00
Kenneth Skovhede 291518983f Merge remote-tracking branch 'origin/master' into feature/more-lax-windows-permissions 2025-09-25 13:16:42 +02:00
Kenneth Skovhede 0746f01879 Updated short functions to be expressions
Also removed superfluous namespaces.
2025-09-24 14:52:44 +02:00
Kenneth Skovhede e4d691f89c Add Administrator to permitted users
This PR updates the set permissions on the data folder and settings database to include the system administrator on Windows.

This fixes #6520
2025-09-24 14:49:42 +02:00
Kenneth SkovhedeandGitHub ba7bee397c Merge branch 'master' into 0nbrsf-codex/find-outdated-packages 2025-08-07 10:48:59 +02:00
Kenneth Skovhede 98deb8c576 Update support for VSS
This updates VSS to default use Vanara in favor of AlphaVSS which is no longer maintained.

The build for Vanara requires targeting `net8.0-windows7.0`, which will cause significant build overhead and complexity for cross platform builds.
To counter this, the setup is to have a single project, `Duplicati.Library.WindowsModules`, that is targeting `net8.0-windows7.0`.
The output from this project is then hoisted into the TrayIcon project for Windows builds so the files are available when debugging on Windows.
A top-level dummy executable project is added to ensure the project always builds.
The built modules are then loaded with reflection when requested.

With the use of Vanara there is now also support for using BackupRead to read files without making a VSS snapshot.
With BackupRead, it is possible to read locked files, but it still requires the SeBackupPrivilege as VSS does as well.

Unfortunately, the `vssapi.dll` file is not shipped for Arm64 on Windows, so even with Vanara this will not work, and only WMIC is supported on Arm64.
A workaround is to run Duplicati with x64 emulation if more advanced VSS features are needed (HyperV and MSSQL support).

This PR also updates options and filters out unsupported options for each operating system, so options that are not supported by the current OS are not reported and will give warnings if they are used, as opposed to just being ignored.

The release builder project has been updated to exclude the unused project, and purge unwanted outputs.
2025-07-01 16:32:19 +02:00
Kenneth Skovhede 819af9e66f Update .NET dependencies 2025-06-24 07:51:26 +02:00
Kenneth Skovhede d37e735d12 Fixed setting the message 2025-06-12 16:36:52 +02:00
Kenneth Skovhede af82ed3a49 Detect EPERM on mac/Linux
This PR updates the check for permission denied to include EPERM and EACCES on macOS/Linux.
2025-06-12 13:36:53 +02:00
Carl Johnsen 8be97bcefd Whitespace changes 2025-05-16 10:22:51 +02:00
Carl Johnsen 04153d2c12 Removed Microsoft.DotNet.Analyzers.Compatibility from csproj's as it's deprecated. 2025-05-16 09:53:26 +02:00
Kenneth Skovhede 46f5efd178 Merge branch 'master' into feature/support-glacier-style-non-readable-files 2025-04-23 22:37:31 +02:00
Carl Johnsen b8966d39a7 No need to perform extra work in SetMetadata if the functionality is disabled 2025-03-25 10:05:12 +01:00
Carl Johnsen 237090e93b Removed whitespace 2025-03-25 10:04:17 +01:00
Kenneth Skovhede dd07dabee1 Merge commit 'b1f705f71a39e4ea79c7dae56bfd0fb345af5110' into feature/support-glacier-style-non-readable-files 2025-03-18 20:44:05 +01:00
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 cd512ea7dd Changed remote path prefix to > to avoid clash with literal string prefix @ 2025-02-21 13:25:00 +01:00
Kenneth Skovhede 1716d09b51 Fixed source providers for S3, CIFS, and SSH.
Made the SMBShareConnection slightly more robust.

Introduced v2 List API to S3 backend, currently it retains v1 as the default.

Changed S3 backends to not recurse, potentially making smaller listings. This option can be disabled if it breaks things.

Added support for relative paths in the SSH backend.
2025-02-21 13:20:52 +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 bb5fd80a29 Implemented support for some backends as sources: SSH, CIFS, and S3 2025-02-17 14:01:08 +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 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 a8dea5c352 Fixed an issue with dropping existing permissions on Windows.
When setting the folder permissions on an existing folder, it would remove the permissions on items inside the folder.

This would cause the files and subfolders to have zero permissions, and reject any interaction.
2025-02-07 16:10:30 +01:00
Kenneth Skovhede f7536df9c2 Added explicit access for the LocalSystem user as suggested. 2025-02-06 21:47:28 +01:00
Kenneth Skovhede a68dba607e Added support for using the current uid/gid instead of using the file uid/gid 2025-02-06 17:21:17 +01:00
Kenneth Skovhede f0f79418d8 Fixed logic so the permissions are always applied, unless the user specifically opts out by placing a file named insecure-permissions.txt in the data folder. 2025-02-06 17:09:18 +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 Skovhede aab91eb0df Added protection to newly create data folder and databases 2025-02-06 16:56:06 +01:00
Kenneth Skovhede 0f4f0e7d0c This adds support for a flag to mark remote files as "Archived".
The intention is that this flag should be recorded in the database so we can avoid selecting archived files for verification.
2025-01-29 10:52:26 +01:00
Kenneth Skovhede fac12ba772 Further consolidated the data folder.
Added support for `--portable-mode` and `--server-datafolder` for the CLI, ServerUtil, and Agent.

Fixed a few places where file reads were not cached properly.

Moved some responsibilities of UpdaterManager into DataFolderManager.

This now supports storing `machineid.txt` and `installation.txt` inside the path pointed to by `--server-datafolder` or alternatively with `--portable-mode`.

It is possible that some fringe backwards compatibility is lost with this update.

Fixed an issue with AutoUpdater crashing on check/download.

This fixes #5902
2025-01-28 13:01:35 +01:00
Kenneth SkovhedeandGitHub 997891525a Updated license-updater to update csproj files (#5898)
* Updated license-updater to update csproj files

* License updates
2025-01-22 21:04:19 +01:00
Carl Johnsen 0861bc0a73 Added FileOpenReadWrite function 2025-01-17 12:26:03 +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
Marcelo Ceccon d4d9c47824 Further progress on removal of build warnings.
None of these changes have impact on code execution, they are mainly part of the effort to remove all build warnings.

The removal of Thread.ResetAbort leaves a TODO for us to integrate CancelationToken when it gets propagated down here on future changes.
2024-11-07 18:02:15 +01:00
Kenneth Skovhede 51f4aa1210 Change from Mono.Posix to Mono.Unix 2024-08-02 22:43:15 +02:00
Kenneth Skovhede 14cd6a3395 Fixed issue with acessing a drive through the VSS snapshot.
This fixes #5259
2024-08-02 16:37:29 +02:00
Suguru Hirahara 556f1ee958 Change eg. to e.g. 2024-07-27 22:51:10 -04:00
Suguru Hirahara ae57dee0f0 Remove redundant space characters from *.cs and *.html 2024-07-26 00:10:31 -04:00
Kenneth Skovhede 1de113bd2f Merge remote-tracking branch 'origin/master' into feature/remove-httpserver 2024-07-18 11:00:52 +02:00
Grzegorz Łagocki 9b19bac7da Add Copyright Property to *.csproj files 2024-07-09 00:37:18 +02:00
Kenneth Skovhede 4294ee3611 Removed last traces of the custom operating system detection 2024-06-11 21:30:33 +02:00
Kenneth Skovhede 1920b0684d Merge remote-tracking branch 'origin/master' into feature/remove-httpserver 2024-06-11 21:22:29 +02:00
Kenneth SkovhedeandGitHub f70748359a Merge pull request #5211 from duplicati/feature/remove-alphafs
Removing unsupported AlphaFS.
2024-06-11 10:44:49 +02:00
Kenneth Skovhede ca425808c5 Merge remote-tracking branch 'origin/master' into feature/remove-httpserver 2024-06-09 21:23:59 +02:00
Kenneth Skovhede 7c9f964eeb Removing unsupported AlphaFS.
This updates #5210
2024-05-30 20:46:25 +02:00