Commit Graph
256 Commits
Author SHA1 Message Date
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
Carl Johnsen 859b65054d Simplified using statements that uses databases or accesses their methods 2025-06-18 11:52:05 +02:00
Kenneth SkovhedeandGitHub 15eb009594 Merge pull request #6343 from duplicati/feature/fix-module-loading
Handle loading and unloading of modules
2025-06-13 10:47:26 +02:00
Kenneth Skovhede f6094baddb Handle loading and unloading of modules
This PR fixes the issues with not correctly loading and disposing modules.

Prior to this PR, there would be only a single instance of each module loaded, which would be configured and later disposed, meaning that the same instance would be used after being disposed, and disposed multiple times.

This mostly worked, but it could carry configuration details over between unrelated runs.

This fixes #6314
2025-06-12 22:13:55 +02:00
Kenneth Skovhede 8c0e5e579d Ensure booleans are false by default
This PR changes `--replace-faulty-index-files` to `--dont-replace-faulty-index-files`, and swaps the default value.

This PR also adds a check that triggers a warning if any boolean values are introduced with a default value that is `true`.
2025-06-12 10:34:57 +02:00
Carl Johnsen 3d11a05400 Added .ConfigureAwait(false) to all of the await statements 2025-06-12 08:34:29 +02:00
Carl Johnsen bd493638af Merge branch 'master' into performance/mssqlite-async 2025-06-02 10:39:33 +02:00
Kenneth SkovhedeandGitHub 0207ad1516 Merge pull request #6299 from duplicati/feature/correct-transfer-progress-api
Websocket subscriptions
2025-05-28 21:40:21 +02:00
Kenneth Skovhede 02439a1f3a Give a custom error message if the backend is not supported.
This fixes #1920
2025-05-28 12:58:30 +02:00
Kenneth Skovhede fb08a0b174 Fixed an issue with retry downloads causing errors 2025-05-28 12:49:29 +02:00
Kenneth Skovhede c8b9fb5c73 Websocket subscriptions
This PR adds the ability to subscribe to messages over a websocket.

To prevent polling data, the server can now push messages through the websocket, so the client can instantly update when new data is available.

The change is backwards compatible, still serving the status updates over the socket. If the client is providing the authentication token, it is auto-subscried to the legacy status message.

If the client is using the new authentication message, it needs to subscribe to get the status updates (and any other services it needs).

The event system has been extended to support new, and more accurate, events. This is the first step towards removing the general status update and the long-poll mechanism.

This also re-introduces the blocking marker, so the client can know if the operation is halted due to too many pending transfers.

Some endpoints have been moved to service implementations, to allow serving the exact same data from both endpoints and websocket.

This PR also updates the way the progress is handled, so that all transfers are returned to the client, and the transfer speeds for each transfer is calculated based on a small sample buffer, so the values are more accurate even if the program is paused during transfers.
2025-05-27 12:13:07 +02:00
Carl Johnsen a37f0dda31 Merge branch 'master' into performance/mssqlite-async 2025-05-22 14:09:17 +02:00
Carl Johnsen 8999dc4baa Updated Controller to use the new async database methods 2025-05-22 08:18:10 +02:00
Carl Johnsen 3e19db371d Removed whitespace 2025-05-22 08:17:53 +02:00
Kenneth SkovhedeandGitHub 697a0b62d0 Merge pull request #6271 from duplicati/feature/issue6200
Flush messages after backup stop
2025-05-20 17:00:07 +02:00
Kenneth Skovhede ef631a1199 Added feature to suppress warnings
This PR adds the option to suppress warnings by their log id. Warning IDs that are supplied to `--suppress-warnings` will be converted to information messages before being logged.

If a specific warning is disabled, such as `CompressionReadErrorFallback`, this will then no longer count as a warning for the job, and the log file will see the warning as an information message.

This PR also adds two simpler filter options that makes it possible to filter log messages by supplying the log IDs. This can already be achieved with log filters, but the ID filter is a bit simpler to apply, as you only need to know the ID.

Finally, this PR also adds common logging for errors in the categories:
- Permission denied, id = `PermissionDenied`
- File locked, id = `FileLocked`
- Path not found, id = `PathNotFound`
- Path too long, id = `PathTooLong`

These new log ids makes it simpler to ignore warnings about locked or inaccesible files.
2025-05-20 14:26:10 +02:00
Kenneth Skovhede 04c7ec5287 Flush messages after backup stop
This change now flushes all pending messages from the backendmanager to the database, even if the main operation crashes (or is stopped).

This ensures that the database and remote storage are more in sync.

Also removed a redundant warning from the backendmanager during shutdown, and simplified a check for active operations.

This fixes #6200
2025-05-20 09:23:29 +02:00
Kenneth Skovhede 6af08d90bb Simplified log setup 2025-05-02 14:45:01 +02:00