Commit Graph
273 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 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 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 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 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 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 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 SkovhedeandCopilot 3ec07aaee1 Added zstd compression
This PR adds experimental support for using either ZStandard or GZip compression. Unlike the Zip module, which also supports these methods, the new module does a full-volume compression which is both much faster and compresses better with modern compression algorithms.

Because the compressor can see the full volume (and not just the blocks) it can compress data across blocks.

The downside to this is that it is not possible to take a single entry out of the compressed stream, but instead, Duplicati needs to decompress the whole stream and can then access the contents.

To make the implementation compatible with standard tools, the inner format is Tar (using ustar format). To allow faster reading, a small end-of-file header is added to the Tar file, emulating the concept from Zip files.

This small addition allows Duplicati to have random access to files in a Tar volume without needing to scan the whole thing.

To make sure data is always recoverable, the format is 100% compatible with regular tools, so `untar -xf` will work on the created volumes.

The downside is an extra pass for decompression when reading the volumes. When writing, each entry (a block of data most commonly) is written to a temporary file before being added to the output stream. It is possible to toggle this to use a memory buffer for even more speed up.

The ZStandard compression is from `ZstdSharp.Port` which has excellent performance.

When we move to .NET11 this can easily be changed to the new built-in module.

Since this is the first attempt to add this, it will log a warning on each use, explaining that the feature is currently just for testing.

Co-authored-by: Copilot <copilot@github.com>
2026-04-30 13:03:24 +02:00
Kenneth SkovhedeandGitHub e821b72bf2 Merge branch 'master' into fix/maintenance-write-path-config-persistence 2026-04-17 12:34:19 +02:00
Kenneth Skovhede c0f40e19ca Updated copyright year to 2026 across the project 2026-04-16 15:21:24 +02:00
Carl Johnsen 4ae9ab7089 Undo wrangling related to when remote synchronization was a module 2026-04-12 18:23:24 +02:00
Carl Johnsen dd6234771b Added a remote synchcronization handler 2026-04-12 08:11:42 +02:00
aureliandevel ccf39670d1 Fix persisted write-path option restore for maintenance and recompress (#6824) 2026-04-04 14:37:31 +11:00
Carl Johnsen 0817b60509 Rather than re-emitting the same results, don't emit the results until after the modules have run. 2026-03-23 09:22:32 +01:00
Carl Johnsen 534bda7166 Added progress tracking to the remote synchronization module to the UI 2026-03-20 09:00:52 +01:00
Carl Johnsen 5046edef49 Re-write the results after running the modules to elevate any errors or warnings emitted by a module to be part of the main results through logging. 2026-03-20 04:39:26 +01:00
Carl Johnsen 21d52ea793 Changed from a reflection based approach to a type safe one.
This is done by making the operation update class public so they can be accessed outside of the main library, and the progress updater is passed down from the controller.
2026-03-20 04:38:16 +01:00
Kenneth Skovhede ec6e32be39 Fixed usage of filelist filter 2026-03-14 18:26:37 +01:00
Kenneth SkovhedeandGitHub baca571ef8 Merge pull request #6727 from duplicati/feature/prevent-restore-target-escape
Prevent restore target escape
2026-02-06 14:33:01 +01:00
Kenneth SkovhedeandGitHub 4745aa464b Merge branch 'master' into feature/add-office-365-backup 2026-01-29 20:11:29 +01:00
Kenneth SkovhedeandGitHub 4d36711769 Merge pull request #6726 from duplicati/feature/fix-dry-run-2
Fixed dry-run command
2026-01-29 20:06:17 +01:00
Kenneth SkovhedeandGitHub 26f7dd8586 Merge branch 'master' into feature/add-office-365-backup 2026-01-29 20:04:42 +01:00
Kenneth SkovhedeandGitHub 29adda9552 Merge pull request #6734 from duplicati/feature/improve-commandline-execute
Minor fixes for better experience when running a command and the data…
2026-01-28 21:05:50 +01:00
Carl-Johannes JohnsenandGitHub 6b02116bed Merge pull request #6708 from carljohnsen/feature/automatic-321
Feature/Automatic 3-2-1 backup
2026-01-28 17:21:33 +01:00
Kenneth Skovhede 0f61698238 Minor fixes for better experience when running a command and the database is in an incorrect version 2026-01-28 15:37:41 +01:00
Kenneth SkovhedeandGitHub 1616341df7 Merge branch 'master' into feature/fix-dry-run-2 2026-01-28 15:20:35 +01:00
Kenneth Skovhede bb2be7966e Fixed issue with missing log
When an error occurred, the log would be written to the database, but the transaction would then be rolled back, causing the log to disappear.

This adds explicit commit to the log when handling error cases.

This fixes #6538
2026-01-27 21:08:36 +01:00
Kenneth Skovhede 655d6cbe65 Prevent restore target escape
This PR adds checks on limited restores, where the user has asked for files to be restored within a specific folder.

This PR adds explicit checks to ensure that the restore data cannot accidentially or maliciously constructed in such a way that it will affect files outside of the restore target folder.
2026-01-27 15:51:30 +01:00
Kenneth Skovhede a986a13abf Fixed dry-run command
This PR adds fixes to honor the --dry-run option to avoid surprises when running an operation.

This fixes #6573
This closes #6581
2026-01-27 15:01:34 +01:00
Kenneth Skovhede a4b33e5d16 Implemented Restore feature and refactored a bit.
Added a free tier for the Office 365 module.
2026-01-20 10:36:37 +01:00
Kenneth Skovhede 27dc64121b Implemented cross-tenant email restore 2026-01-16 11:09:13 +01:00
Carl Johnsen b7b805f148 Avoid using hardcoded strings for logtag 2026-01-15 11:57:11 +01:00
Carl Johnsen 725b6e2de1 Inline getting variable from options 2026-01-15 11:56:54 +01:00
Kenneth Skovhede 1f0b0d5f52 Added loader interceptor for the restore path 2026-01-14 10:13:50 +01:00
Kenneth Skovhede 1523f730e3 Added support for storing metadata in the database 2026-01-14 10:01:20 +01:00
Carl Johnsen 177272ecd9 Merge branch 'master' into feature/automatic-321 2026-01-08 20:55:31 +01:00
Carl Johnsen 48180770e3 Removed unnecessary project reference to builtin modules 2026-01-08 14:35:46 +01:00
Kenneth Skovhede 0f81b42146 Add support for remote locks
This PR adds support for locking files if the backend supports it.

To activate locking, set the option `--file-lock-duration=30D` and the backup will lock the files.

If the database is rebuilt with the intention of continuing the backups, use the option `--repair-refresh-lock-info` which will update lock information in the database after recreating the database.

The locking works by asking the backend to lock files after a backup has completed.

The implementation keeps track of which files are currently assigned a lock and prevents attempting to delete the files that are currently locked.

Note that the bucket should not have a default lock policy as Duplicati needs to finish the backup before the locking is applied.

In this initial version, Azure Blob Storage, B2, S3 and iDrive are supported with locking.

The CLI is updated to allow setting locks on a specific version. The backend tool is updated to allow setting locks on specific files.
2025-12-14 17:17:48 +01:00
Kenneth Skovhede eb34f8a6b8 Revert "Reverted flag to be allow-empty-source so the check is on by default."
This reverts commit 139b4747af.
2025-08-15 11:01:34 +02:00
Kenneth Skovhede ba2ea61ca4 Add option to log HTTP and socket requests
This adds the options `--log-http-requests` and `--log-socket-data` which can be activated to capture diagnostics about HTTP requests and socket operations.
2025-08-08 19:18:30 +02:00
Kenneth Skovhede 139b4747af Reverted flag to be allow-empty-source so the check is on by default. 2025-08-06 08:18:38 +02:00
Kenneth Skovhede 3526b1f117 Added --prevent-empty-source 2025-08-05 15:19:25 +02:00
Marcelo C. 0bc6f990bf Excludes dummy backend from command check
Avoids unnecessary backend command checks for the dummy backend url which was manifesting into issue #6442
2025-07-31 17:29:57 -03:00
Kenneth Skovhede 6d63f86610 Avoid stack traces for missing sources 2025-07-10 18:01:44 +02:00
Carl Johnsen f6ac30e831 Merge remote-tracking branch 'upstream/master' into performance/mssqlite-async 2025-06-19 12:17:30 +02:00
Carl Johnsen 2412800c0c Removed the sqlite page cache option. It should be set through the environment variable, or some other way of providing a custom database configurotion 2025-06-19 11:41:39 +02:00
Carl Johnsen 31c5441bdb Forwarded cancellation tokens, added some missing .ConfigureAwait() and added some missing docstrings 2025-06-19 11:04:09 +02:00
Carl Johnsen 9ac583db94 Made all relevant using statements use await to use DisposeAsync 2025-06-18 11:53:11 +02:00