Commit Graph
3311 Commits
Author SHA1 Message Date
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 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
Kenneth Skovhede 584884de0a Always log the append queries as they are not in the hot-path for backups 2026-05-06 15:20:16 +02:00
Kenneth Skovhede ab487bdde2 Optimize synthetic filelist creation
This PR adds a test that generates a synthentic filelist of a variable size, and then measures the time it takes to recreate the fileset.

As there was a reported slowdown, analysis indicated that the query would grow in the order of O=N^2, where N is the number of paths.

The code is then updated to instead use some temporary on-disk space to lay out the paths and then insert them as a new fileset. This should bring the time down to O=N.

Based on a test with 10k files, the query speed up is ~900x, but will be more on larger filesets.
2026-05-06 15:16:10 +02:00
Kenneth Skovhede 4244e71fee Improve SQL logging
This PR improves SQL logging by capturing many places where the calls would previously just hit the database and not produce any logging output.
2026-05-06 10:52:58 +02:00
Kenneth Skovhede 42a15cacb5 Fix SecretProvider Init Failure
This PR adds a try/catch around initializing the default secret provider, to avoid crashes on startup where the setup is not correct for the provider.

If an explicit provider is set, this will crash as the user explicitly asked for it, but it is not working.

With this change, the implicit secret provider does not cause crashes.
2026-05-04 13:31:16 +02:00
Kenneth SkovhedeandGitHub 9fd6e83536 Merge pull request #6884 from duplicati/feature/quota-disable-on-remote-sync
Add `quote-disable` to synctool
2026-05-04 11:34:15 +02:00
Kenneth SkovhedeandGitHub 25d9eeb1b7 Merge pull request #6825 from aureliandevel/fix/maintenance-write-path-config-persistence
Fix persisted write-path option restore for maintenance and recompress
2026-05-04 10:26:36 +02:00
Kenneth SkovhedeandGitHub bf1f5a01ce Merge pull request #6873 from duplicati/feature/full-zstd-compression
Added zstd compression
2026-05-04 10:23:52 +02:00
Kenneth SkovhedeandGitHub cc0a82ec24 Merge pull request #6879 from duplicati/feature/post-backup-script
Added post-backup script
2026-05-04 10:21:35 +02:00
Kenneth Skovhede fc675638c4 Throwing a UserInformationException instead of the generic exception 2026-05-04 10:19:54 +02:00
Kenneth Skovhede 9717450b30 Add quote-disable to synctool
This PR adds support for using the `quota-disable` option to diable the quota check performed before executing the remote sync operation.

This is needed if the quota information returned is unreliable.
2026-05-04 10:17:54 +02:00
Kenneth SkovhedeandCopilot 6e13cdbc53 More defensive delete
This PR adds a small clause the prevents the delete query from failing if there are inconsistencies where deleted blocks can exist and a volume has no blocks.

I was not able to reproduce the issue without manipulating the database, but it was reported happening on the forum.

Co-authored-by: Copilot <copilot@github.com>
2026-05-01 15:02:09 +02:00
Kenneth Skovhede 39636c6364 Added post-backup script
This PR adds a new `--run-script-post-backup` option that allows running a script after the main backup operation has completed, but before locking, compacting and verification is done.

The use for this is intended for cases where you want to stop or pause some service, run a backup, and then resume the service. Prior to this PR you would need to wait for the entire backup operation to complete, but with the new option you can resume as soon as the source data is no longer needed.
2026-05-01 07:06:12 +02:00
aureliandevelandGitHub 4ecac56250 Merge branch 'duplicati:master' into fix/maintenance-write-path-config-persistence 2026-05-01 11:37:04 +10:00
Kenneth SkovhedeandGitHub cdb0e86936 Merge pull request #6870 from duplicati/feature/remote-volume-size-option
Add remote-volume-size alias
2026-04-30 13:04:29 +02:00