Commit Graph
3325 Commits
Author SHA1 Message Date
Kenneth Skovhede 8663f55e8b Fixed case-insensitive search
This PR fixes a bug that caused backup searching to be case-sensitive.

The PR also exposes the case sensitive-flag in the API endpoint so the UI can toggle case-sensitive searching.
2026-06-17 10:15:08 +02:00
Kenneth SkovhedeandGitHub 59be19660c Merge pull request #6954 from duplicati/feature/support-ads
Implement support for ADS
2026-06-17 08:58:29 +02:00
Kenneth Skovhede d06b217975 Improved check for empty restore 2026-06-16 15:05:44 +02:00
Kenneth Skovhede bfc4b00d96 Added quick exit if no files match when restoring 2026-06-16 12:03:55 +02:00
Kenneth Skovhede c58087db7e Fixed tests to check for errors, instead of crashing the restore process on path traversal checks 2026-06-16 10:20:27 +02:00
Kenneth Skovhede 4aa61b2352 Avoid using .NET File operations during restore as they normalize paths. 2026-06-15 22:51:13 +02:00
Kenneth Skovhede 980f80084c Handle case where ADS was restored before the host entry. 2026-06-15 16:10:26 +02:00
Kenneth Skovhede 9f3ea8f805 Fixed isseus with restoring ADS correctly 2026-06-15 14:43:24 +02:00
Kenneth SkovhedeandGitHub eeb9bea2d9 Merge branch 'master' into feature/support-ads 2026-06-12 19:43:31 +02:00
Kenneth Skovhede ee92633b80 Reworked parameter mapping and passing inside Controller.cs to avoid future issues with lambda captures that prevent module modifications from being applied. 2026-06-12 17:41:17 +02:00
Kenneth Skovhede 933c8924c8 Fixed filter not being passed to soem controller methods 2026-06-10 14:18:06 +02:00
Kenneth Skovhede ee371c7413 Handle script modified filter
This PR fixes a bug where a script could write a new filter, but the filter was never applied to the backup.

This also fixes an issue where the filter string was not available in scripts or emails, except on the initial call.

This PR updates the logic so the `run-script-after` and `run-script-post-backup` also have access to the filter string, if needed for reporting or other.

This fixes #5143
2026-06-09 16:29:02 +02:00
Kenneth SkovhedeandGitHub 04a0619296 Merge pull request #6952 from duplicati/feature/allow-disable-default-secret-provider
Allow disable default secret provider
2026-06-09 10:13:41 +02:00
Kenneth Skovhede ce006a695d Merge branch 'master' of github.com:duplicati/duplicati 2026-06-08 19:33:25 +02:00
Kenneth Skovhede a4820ccb62 Implement support for ADS
This PR implements support for reading and writing alternate data streams on Windows.

For now, the option is disabled by default and needs to be enabled with `--enable-ads-backup`. After this option is set, Duplicati will also extract any alternate datastreams from the filesystem and include them in the backup.

By default, ADS elements will be restored, but `--disable-ads-restore` can be used to ignore any ADS elements during the restore process.

This fixes #189
2026-06-08 19:33:01 +02:00
Kenneth Skovhede 0e36faab78 Allow disable default secret provider
This PR adds a new option `--disable-default-secret-provider` that will fully disable probing for the default secret provider.

This is to assist in cases where the secret provider is broken or shows unwanted popup dialogs.
2026-06-08 17:32:21 +02:00
Kenneth Skovhede 98ce287522 Rename to fix warnings
Recent C# compilers warn if async methods are not suffixed with `Async`.

This PR fixes a number of such warnings.
2026-06-08 13:16:17 +02:00
Kenneth Skovhede aceafbd52c Fixed option name typo 2026-06-04 10:38:33 +02:00
Kenneth Skovhede ba58064de8 Handle extended Win32 file attributes
This PR extends the handling of excluded file attributes on Windows to include additional values that are present in Windows 10+11, but are not yet part of the .NET file attributes.

Specifically, this handles the `FILE_ATTRIBUTE_RECALL_ON_OPEN` and `FILE_ATTRIBUTE_RECALL_ON_DATA_ACCESS` attributes which are used to signal files are not available locally and will be fetched on access.

On Windows, a new option `--exclude-non-local-files` is added which will simply update `--exclude-files-attributes` with `Offline,RecallOnOpen,RecallOnDataAccess` such that setting the option will exclude offline files from the backup, without requiring that the user is aware of the attribute names or effects.

For all platforms, this PR also updates the parsing of the `--exclude-files-attributes` so it is now a flags-type enum and will validate the input as well as show the possible options in help and dropdowns.
2026-06-04 10:14:29 +02:00
Kenneth SkovhedeandGitHub 4cdc0d5233 Merge pull request #6925 from carljohnsen/feature/autotune-tool
Feature/AutoTune tool
2026-06-03 22:54:18 +02:00
Kenneth SkovhedeandGitHub 1250b1c964 Merge pull request #6945 from duplicati/feature/context-aware-testing
Added read-only testing to backends
2026-06-03 21:35:14 +02:00
Kenneth SkovhedeandGitHub 8b5a802808 Merge pull request #6943 from duplicati/feature/make-fs-parsing-experimental
Make FS parsing experimental
2026-06-03 21:30:28 +02:00
Kenneth SkovhedeandGitHub b33f81d8e8 Merge branch 'master' into feature/autotune-tool 2026-06-03 17:43:44 +02:00
Kenneth Skovhede 4d569c51e4 Added read-only testing to backends
This PR adds a flag to the test method so we can choose to test for read-only access (needed for restore) or read-write (needed for backups).

Additionally, this PR fixes a logic bug in that the BackendSourceProvider would not actually test the connection, but just check the placeholder element returned (which is always returned). With this PR the backend's ListAsync command is tested fully.

Also renamed the methods on ISourceProvider to have the `...Async` prefix.

This replaces #6939
2026-06-03 17:27:34 +02:00
Kenneth Skovhede bc968cbaf0 Fix remote file locking on Windows
This fixes a locked database issue on Windows.

The issue was caused by the backup process having an open database, and then not passing that connection to the lock handler.
The lock handler would then attempt to open a new connection to the same database, which would fail.

This PR fixes the issue by passing an instance of the database to the lock handler.
Also addressed a logic issue where the dbpath was checked, even if an existing database connection was found.
Also fixed the lock results not setting the EndTime property, causing the reported lelapsed time to be off.
2026-06-03 12:45:57 +02:00
Kenneth Skovhede eeb323b51d Make FS parsing experimental
This PR flips the logic so filesystem parsing is not enabled by default. This means that any disk source will be treated as an opaque stream of blocks.

Brave users can still try out the filesystem parsing, but we need more time to ensure the logic works across variations on filesystems.
2026-06-03 10:37:58 +02:00
Kenneth SkovhedeandGitHub 63d0a44d71 Merge pull request #6921 from duplicati/feature/add-ipc-for-controller
Added IPC for operations
2026-05-21 11:10:44 +02:00
Kenneth Skovhede 4bad50eda6 Updated to a more maintainable setup, inplementing the interface more directly.
Added a test for IPC callbacks.
2026-05-20 18:17:10 +02:00
Carl Johnsen eee9b505f2 Merge branch 'master' into feature/autotune-tool 2026-05-19 10:53:30 +02:00
Carl Johnsen 68d3ee3252 Meta appeared twice in FileProcessor internal timings report 2026-05-18 08:26:57 +02:00
Kenneth Skovhede 15b432779e Improved error message on snapshot failure 2026-05-18 08:16:34 +02:00
Kenneth Skovhede bc945f4a29 Added IPC for operations
This PR adds experimental support for running the backup in an isolated process.

The motivation for this is to protect the server from a faulty process and later enable running server and processing with different security levels.

This needs to be toggled on, and then it will run the process isolated. When running as an isolated process, the "Abort" call will kill the process so it can no longer become "stuck".
2026-05-15 17:13:21 +02:00
Kenneth Skovhede f03cf2f7a3 Detatch options on controller
When creating a new controller, the options dictionary was used by-reference.

This meant that code could update the options dictionary *after* creating the controller, which would not be thread-safe.

It does not have much effect on regular operations as the normal method is to create the dictionary, pass it, and not modify it.

But in the tests, we frequently re-use the dictionary and update it with new values to test various cases.

Due to the dictionary being a reference, the controller would update the dictionary to fit the operations, but this would reflect back into the tests, meaning that some tests were being run with options that were not supposed to be there.

This meant that at least two edge cases that we test for were never found to have errors, even though they do.

The first issue is the listing of files using a non-default blocksize. The second issue is recreating the database with a non-default file-hash algorithm.

This PR removes the reference passing, and fixes the issues that were uncovered.
2026-05-14 17:59:49 +02:00
Kenneth SkovhedeandGitHub 0d29006317 Merge pull request #6915 from duplicati/feature/make-controller-async
Make controller Async
2026-05-13 20:06:25 +02:00
Kenneth Skovhede 3db5e09004 Fixed helpIds in rsync tool 2026-05-13 17:09:39 +02:00
Kenneth Skovhede f5e07dec6b Hide test options
This PR hides the `--unittest-mode` option that is used to treat all warnings as errors which is helpful when testing things, but is not intended to be used elsewhere.

The option is simply not shown in the list of supported options but still works in case anyone wants to use it.
2026-05-13 15:42:36 +02:00
Kenneth Skovhede 179d1ceb47 Make controller Async
This PR has a large blast radius because it takes the final step and bumps up the Controller to be fully async.

We have historically done a piece-by-piece update, so all operations were already async but the controller interface was kept synchronous.

With this update, the controller is now fully async and all tests are updated.

Most places where the new C# compiler warns about function names not ending in `Async` were also adressed, giving a massive refactor change.

Functionally, no changes are done.
2026-05-13 15:04:13 +02:00
Kenneth SkovhedeandGitHub 131df8f58b Merge pull request #6913 from duplicati/feature/deprecate-backends
Deprecate old SharePoint
2026-05-13 14:46:21 +02:00
Kenneth Skovhede 55c2ebf6c7 Deprecate old SharePoint
This PR deprecates the `mssp` and `od4b` backends as they stopped working when the APIs were turned off.

The upgrade path is to use `sharepoint` instead (which used to be named "SharePoint v2").

This PR also adds a small amount of metadata to modules so they can be marked as "untested" or "deprecated", and the configuration for marking modules has been set up in `BackendModules.cs`.

The backends that we currently cannot test (usualy due to not having public signups) are now marked as untested.
2026-05-13 13:30:39 +02:00
Kenneth Skovhede 94f42a312b Improve restore message
This PR changes the restore message when no files are restored.

The logic now keeps track of existing files that do not need to be restored, as well as the actual number of bytes written.

The size of restored files was tracked previously, but was instead reporting the size of the written data.

With this update the legacy restore and new restore report the same numbers.

The warning that is shown if no files are restored has been updated to check if existing files were present, and if so, the restore is assumed to have worked as expected, and an information message is logged, instead of the warning message.
2026-05-13 10:57:28 +02:00
Kenneth SkovhedeandGitHub d12e0a5d07 Merge pull request #6911 from duplicati/feature/enforce-metahash
Enforce metahash in filelist
2026-05-13 10:40:42 +02:00
Kenneth Skovhede e51f16827c Enforce metahash in filelist
This PR adds a small change when writing the `filelist.json`. The code now *requires* that a metahash is present when writing an entry.

Previously, the code would handle cases where there was no metahash and output the `filelist.json` without these fields.

However, the recreate fails if the fields are missing due to database consistency requirements.

Also, there appear to be no regular code paths that should end up creating an entry without the metahash.

This may need to be reverted, but for now it will help track down if there are any cases where a missing metahash is needed, and if we find that, we can fix the relevant functions and revert this change.
2026-05-13 07:00:22 +02:00
Kenneth Skovhede 8fad3dce78 Removed unused function 2026-05-12 13:24:12 +02:00
Kenneth Skovhede 89654c2474 Add safeguard to synthetic filelist
This adds an extra clause when building a synthetic filelist to avoid cases where the synthetic filelist fails to be generated because some entries are orphans.

The tests that reproduce this are quite slow and require some tampering with the database to get into the faulty state, so the tests will not run in CI testing but can manually be executed.
2026-05-12 13:00:02 +02:00
Kenneth SkovhedeandGitHub 165322d9e1 Merge pull request #6901 from duplicati/feature/persist-used-compression-module
Persist used compression module
2026-05-08 15:43:10 +02:00
Kenneth SkovhedeandGitHub 1a8c6a35f1 Merge pull request #6900 from duplicati/feature/slow-query-monitor
Add slow query monitor
2026-05-08 13:46:48 +02:00
Kenneth Skovhede d998ca81d3 Persist used compression module
This PR fixes an issue with using a non-default compression method. The recreate database will detect the compression module correctly and restore everything. But when recreating the database it will look at the `compression-module` from the given options and persist this value into the database.

If the recreate was made without passing in the compression module in the options, the default compression module would be persisted to the database, which would later cause problems for operations that rely on this value.

With this PR there is a test for the behavior, and the compression module is extracted from the first volume, similar to how blocksize and other options are written back.
2026-05-08 12:53:52 +02:00
Carl Johnsen 7c04b2c046 Added default restore config from the default options 2026-05-08 11:27:22 +02:00
Kenneth Skovhede 308e8428c7 Add slow query monitor
When queries are slow on end-user machines it is hard to debug what the exact problem is.

The typical flow is to discover a "stuck" process. But since profiling logging was not enabled there is no output.

The user then has to re-run the problematic operation with profiling on, and locate the last output where the call gets stuck.

This PR introducces a monitor mechanism where all queries register themselves prior to execution, and then de-register once done.

At a fixed interval, the list of active queries is examined, and if a query is found to be running longer than the threshold, it will be logged as a warning.

This means the user can simply go view the live log for warnings, and the offending query will be emitted.

The default threshold is set at a conservative 30 minutes. Since the timer only checks at the interval, it can take at most 2x the interval before a message is logged. After this, a message is logged each time the interval is reached (e.g., a new warning is logged every 30 min).

The option `--long-database-query-threshold` can be used to set a different threshold.
2026-05-08 10:30:47 +02:00
Kenneth Skovhede 95516aa08b Handle empty index files
In some cases it is possible for the index volumes to be created with empty block lists. If this happens, the reader would fail as the strict JSON parsing would encounter an unexpected token.

With the fix, the code now correctly reads such JSON documents and some variants.

Added a number of tests to make sure these cases are correctly reproduced.

This fixes #6892
2026-05-07 15:01:30 +02:00