Commit Graph
400 Commits
Author SHA1 Message Date
Kenneth Skovhede 8224d84f57 Reverted to use the shorter name --asynchronous-upload-limit and then added an alias for --asynchronous-concurrent-upload-limit. 2025-10-16 13:25:34 +02:00
Kenneth Skovhede 55c19c8752 Removed more references to the unused option 2025-10-16 13:21:40 +02:00
Kenneth Skovhede d3b15f136e Removed unused option
The option `asynchronous-upload-limit` was not used, and has been removed.
2025-10-14 21:30:02 +02:00
Carl Johnsen a1e1afce28 Changed the default volume cache hint to be volumesize * 100 2025-10-03 08:50:35 +02:00
Kenneth SkovhedeandGitHub 926ff199f4 Merge pull request #6485 from duplicati/feature/revert-allow-empty-source
Invert `--allow-empty-source`
2025-08-15 11:41:07 +02: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
Carl Johnsen 0194d2a486 Merge branch 'master' into feature/restore-volume-cache-size-parameter 2025-08-14 17:22:41 +02:00
Carl Johnsen 3e10b8446a Changed the wording of the new volume cache parameter 2025-08-14 17:20:58 +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
Carl Johnsen dc4d8fa587 Added the option to control the size of the volume cache during restore 2025-08-08 12:44:59 +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
Kenneth Skovhede 6502017c57 Merge remote-tracking branch 'origin/master' into feature/vanara-vss-backup 2025-07-03 17:09:30 +02:00
Kenneth SkovhedeandGitHub 5ff613b5da Merge pull request #6360 from carljohnsen/performance/mssqlite-async
Performance/Asynchronous database backend
2025-07-03 11:07:26 +02:00
Kenneth SkovhedeandGitHub 29f5eb79e5 Merge branch 'master' into feature/vanara-vss-backup 2025-07-01 16:35:57 +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 3719935b1d No exempt throttle backends
This PR removes the default value of `file` as a throttle exempt backend, so all backends are  subject to throttle by default.

This change makes the option easier to work with as the empty string could not be used to undo the default value, and fixing this would make the options be applied inconsistently.

Also fixed two errors in the help text for the option.
2025-06-24 16:13:59 +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
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 SkovhedeandGitHub 35e389b507 Merge pull request #6333 from duplicati/feature/booleans-should-be-false-by-default
Ensure booleans are false by default
2025-06-13 10:46:54 +02:00
Kenneth Skovhede ee9c2a640b Secret provider option should be a password
This changes the `--secret-provider` type to be a password, as it may contain credentials for the key vault.
2025-06-13 09:12:16 +02:00
Kenneth SkovhedeandGitHub d74778bbf5 Merge branch 'master' into feature/booleans-should-be-false-by-default 2025-06-13 08:58:12 +02:00
Kenneth Skovhede 7c602106c3 Simplified priority sorting 2025-06-13 08:08:42 +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
Kenneth Skovhede 35058d333e Update handling of alternate OAuth url
This PR removes the `OAuthContextSettings` class, and makes the `--oauth-url` option available on each backend that uses it, so it can be configured as part of the destination.

To assemble everything related to configuring OAuth, the code was moved to the `AuthIdOptionsHelper`, such that the usage can be shared between implementations.

This PR also adds the option to set the default OAuth url from the environment variable `DUPLICATI_OAUTH_SERVICE`.

The server can then be set in the following locations (most important last):
- Environment variable
- Server-wide advanced settings
- Backup job advanced settings (or commandline)
- Destination url
2025-06-11 09:27:40 +02:00
Kenneth Skovhede 3ebc50a89d Adding repair for index files
Since index files only contains information related to recreating the database, they can be recreated directly from a working database.

This PR adds an automatic repair feature that replaces index files if they are missing content. This will gradually repair remote index files if they are affected by the compact bug that re-wrote index files without the blocklists.

To fully repair, it is possible to run the `Test` command with the option `--full-remote-verification=indexonly` and a large number of samples. Since the new option `--replace-faulty-index-files` is default set to `true` this will repair any defective index files and ignore all others.

This update uncovered that the Test method would previously not verify the presence of blocklists in the index files. This is likely a very old bug, caused by the fact that the original implementation did not place blocklisthashes in the index files. The omission of this check is the reason the extent of the compact issue was not discovered earlier.

With this PR it is now also visible that there is ample room for error in creating the index files during the backup process. This is caused by the parallel processing and carry-over, where the index files are created on-the-go, so they are ready to upload once the blocks are filled.

While this is likely good for performance, it has some drawbacks.
- A failed block upload will cause a rewrite of the index file
- An elaborate callback system is needed to update the index file
- It is possible to race against the database and create extra blocklist hashes, bloating the index files (causes problems on verification)

A subsequent task is to rewrite the logic to not touch the index files outside the backend manager, so the backend manager will just use the database to create the index file. This means the same code will be invoked for both the create, the recreate, and the replacement.

For now, extra content in index files is logged with the verbose log level.

This fixes #6296
2025-05-27 17:15:02 +02:00
Kenneth SkovhedeandGitHub 6f5505f2a2 Merge pull request #6279 from duplicati/feature/issue2685
Default disable throttle for local destinations
2025-05-26 08:29:29 +02:00
Kenneth Skovhede a4234a342c Default disable throttle for local destinations
This PR adds the option to disable throttle on a backup, so it will ignore throttle settings both from the server and the job.

Additionally, a list of backend keys can be provided, where backups will disable throttling. This can be used to set advanced options with a set of backends that should not be throttled.

By default, the `file` backend is now exempt from throttling by default.
This fixes #2685
2025-05-20 19:06:35 +02:00
Kenneth Skovhede ded55740de Set VSS to Auto if user has permissions
If th user has the SeBackupPrivilege, set the default snapshot policy to `Auto` and otherwise use `Off` (the current default).

This ensures that if the process is running with the correct permissions, there will be fewer warnings.

This only changes the default value on Windows.

This fixes #2833
2025-05-20 16:53:11 +02:00
Kenneth Skovhede 1cfacca794 Enabled nullable for FilterExpression and Options
This adds nullability to FilterExpression and Options.
It also updates almost all properties in Options to use a common format that enforces uniform parsing of the values.

A few options have been updates to have the default values specified as a constant, to avoid replicating the value in two places.
2025-05-20 14:36:39 +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 fe866ceb9f Implemented support for repairing the database when only parts of the source data is available.
This repair will leave the database in a still-broken state, but if this is run prior to purge-broken-files, less data will be lost.

Also updated the purge-broken-files operation to keep files and directories in the set, if they are only missing metadata.
2025-05-09 11:12:29 +02:00
Kenneth SkovhedeandGitHub 5464dc0940 Merge pull request #5133 from duplicati/feature/support-cachedir-tag
Added `CACHEDIR.TAG` as the default marker for ignoring directories
2025-04-26 10:39:01 +02:00
Kenneth SkovhedeandGitHub 1bbe04a782 Merge branch 'master' into feature/add-sqlite-cache-value 2025-04-25 13:58:24 +02:00
Kenneth SkovhedeandGitHub f3d7905f0e Merge branch 'master' into feature/support-cachedir-tag 2025-04-23 22:04:06 +02:00
Kenneth Skovhede 23db3fd090 Added flag to ignore updating to existing version
This fixes #4604

This fixes #3587

This fixes #2275
2025-04-23 17:05:40 +02:00
Kenneth Skovhede 0a7a1cd689 Added option to set the SQLite page cache
This adds an extra option to allow setting the SQLite page cache size as a regular option.

Prior to this commit it was only possible to set the SQLite page cache size via environment variables.

The option to use environment variables is preserved, and as options from the environment variable are applied after the new setting, environment variables take precedence.

The default value for the new option is to use 1% of the system memory for the page cache. For the restore process, a connection per worker may be made which defaults to half the number of cores, so the maximum amount of memory is 1% * half the CPU cores.

This is just the upper limit, and SQLite may choose not to use all of it.

This fixes #6178
2025-04-22 14:26:46 +02:00
Kenneth Skovhede f91c814a45 Introduce DateTime option type.
This commit adds the `DateTime` option to support validation of the `--time` parameter, which can both be an absolute date and time, or a relative value.

This fixes #6107
2025-04-01 14:17:37 +02:00
Carl Johnsen 11bbc629c3 Increased default channel buffer sizes during restore 2025-03-24 14:00:59 +01:00
Kenneth Skovhede 6c7843b332 Unified options
This PR adds a unified way of supplying timeouts to each of the backends.

It also adds an opt-in way of adding commonly used options, so parsing and usage can be standardized across multiple backends.
2025-03-19 15:27:02 +01:00
Kenneth Skovhede a0c1676bca Added option to force repair with an older database. 2025-03-11 10:45:22 +01:00
Carl-Johannes JohnsenandGitHub 476774640a Merge pull request #5991 from carljohnsen/performance/restoreopt2 2025-02-28 13:03:25 +01:00
Carl Johnsen 260786a91a Merge branch 'feature/restore-buffer-size-option' into performance/restoreopt2 2025-02-27 14:03:01 +01:00
Carl Johnsen 038e78ad06 The block cache is now always present, as it keeps track of blocks. In case of a cache size 0, every Set() will trigger an evict. 2025-02-27 11:17:11 +01:00
Carl Johnsen 6d7faf97bb Whitespace 2025-02-25 17:41:57 +01:00
Carl Johnsen 42ec5b633c Restore block cache max option didn't match the description 2025-02-25 17:41:35 +01:00
Carl Johnsen c5ebf4fa71 Added the restore channel depth option 2025-02-25 16:19:04 +01:00
Carl Johnsen 123c12e2c3 Whitespace 2025-02-25 16:18:13 +01:00