Commit Graph
894 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 c65dc52fc6 Path traversal now logs a warning instead of crashing the recovery restore. 2026-06-12 16:37:08 +02:00
Kenneth Skovhede 8cb1c9562e Block path traversal in recovery tool
This adds a check that prevents restoring files outside the specified target folder when using the recovery tool.

When choosing to restore to a specific folder, the expectation is that files are not restored outside the folder, which could happen with symlinks or manually crafted entries. This blocks it the same way the regular restore does and also supports `--allow-restore-outside-target-directory` to disable the check.
2026-06-08 19:17:07 +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 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 a0e672f2cf Added support for configuring TLS certificates as part of the install 2026-05-28 22:57:25 +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
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 65eadb815c Fixed restore in recovery tool 2026-05-14 22:25:41 +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
aureliandevelandGitHub 4ecac56250 Merge branch 'duplicati:master' into fix/maintenance-write-path-config-persistence 2026-05-01 11:37:04 +10:00
aureliandevel ff131f75c3 Fix full result option mismatch by adding alias support and updating tests 2026-04-26 11:51:51 +10:00
aureliandevel 575cd643ee Drops the unnecessary local DB update post-recompress, and associated tests. 2026-04-23 10:14:51 +10:00
Kenneth Skovhede 4d5bb90e4a We know the URL is correct in this case, so it should match explicitly 2026-04-22 14:54:19 +02:00
Kenneth Skovhede 15f21a5dc1 Minor style updates and some doc updates 2026-04-22 14:35:20 +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
9bbb3e86c1 Update Duplicati/CommandLine/ServerUtil/Commands/DeleteBackup.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-13 16:42:14 +02:00
Kenneth SkovhedeandGitHub 9146921e73 Update DeleteBackup.cs
Fixed stray comma
2026-04-13 15:47:53 +02:00
Wouter Tinus 7cb8d1055b Add DeleteBackup command to ServerUtil 2026-04-10 17:43:30 +02:00
aureliandevel ccf39670d1 Fix persisted write-path option restore for maintenance and recompress (#6824) 2026-04-04 14:37:31 +11:00
Kenneth Skovhede 8b2475ee93 Add verify and cleanup to database tool
Adds two new commands to the database CLI tool:

- verify: Lists all databases with their status (Found, Missing, Orphaned)
  across dbconfig.json, server database, and filesystem

- cleanup: Removes orphaned database files not referenced in dbconfig.json
  or server database, with --dry-run and --force options

Includes unit tests for both commands.
2026-03-11 10:27:45 +01:00
Kenneth Skovhede 2634eb3f64 Added support for generating the database.
Added better logging.
2026-03-02 16:39:19 +01:00
Kenneth Skovhede 07cd39af34 Add support for managed TLS
This PR adds support for generating a self-signed CA and then using that CA to generate TLS certificates.

A new tool `duplicati-configure` / `Duplicati.CommandLine.ConfigureTool.exe` is added to manage the certificates.  The tool saves the configuration in the database and is meant to run with elevated privileges for the initial CA installation.

The option `--configure-https` can be added to server/trayicon, and if the process has permissions, this will automatically install the CA certificate.

If a CA is configured, the server will automatically issue, renew and use a TLS certificate.

With this setup, the TLS is opt-in, but once the flow is well tested, we can switch it to opt-out.
2026-03-01 11:33:05 +01:00
Kenneth Skovhede ea6d94b035 Added support for storing multiple targets in database with backwards compatibility. 2026-02-18 11:06:08 +01:00
Kenneth SkovhedeandGitHub 562cb1199a Merge branch 'master' into feature/add-destination-repo 2026-02-02 11:00:39 +01:00
Kenneth Skovhede cf17d2617e Added a connection string repo
This adds a connection string repo, where connection strings can be stored.

The general idea is that it is possible to store connection strings, say an S3 connection, and then re-use the connection string for multiple backups, editing as needed.

The implementation supports listing connection strings, creating, updating, and deleting them.

The connection strings are masked so sensitive information is not available in the browser, and the logic patches connection strings internally to ensure markers are replaced with the correct values.

The connection string itself is stored in full, such that a Duplicati version roll-back will not make the connectionstring become invalid.

There is also an endpoint that allows updating existing backups using the connection string, so it is easy to rotate keys. The logic for this feature is that it retains: scheme, port, host, path, and any extra settings on the target url.
It does not remove settings from the target, but will overwrite or add settings from the connectionstring.
2026-01-30 13:59:47 +01:00
Kenneth Skovhede 3341794c64 Work on restoring channel messages 2026-01-22 17:01:13 +01:00
Kenneth Skovhede 27dc64121b Implemented cross-tenant email restore 2026-01-16 11:09:13 +01:00
Kenneth Skovhede 1523f730e3 Added support for storing metadata in the database 2026-01-14 10:01:20 +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 SkovhedeandGitHub 179fd4da47 Merge pull request #6653 from duplicati/feature/secret-provider-write-support
Initial implementation of write-support for SecretProviders
2025-12-05 15:23:32 +01:00
Kenneth SkovhedeandGitHub d4951720a7 Merge pull request #6658 from duplicati/feature/support-extended-import-in-server-util
Added support for settings override in imports
2025-12-03 10:36:08 +01:00
Kenneth Skovhede 1e4a1d3df3 Added support for settings override in imports
This PR adds the option to provide additional settings when importing a backup.

The ServerUtil has been expanded to support passing in the target url and backup passphrase when importing a backup.

Also clarified wording around the import passphrase as there are (at least) two passphrases related to imports.

This fixes #6640
2025-12-02 10:26:45 +01:00
David Kartchner b7a25263e8 Updated RecoveryTool help text to mention --new-passphrase option 2025-12-02 02:24:51 -07:00
David Kartchner 5113d0e989 added an option to supply a new passphrase for reencryption with RecoveryTool recompress command 2025-12-02 02:24:06 -07:00
Kenneth Skovhede ead7b06c05 Better docs and output 2025-12-01 15:33:15 +01:00
Kenneth Skovhede 695d190b91 Updated to allow IsSupported to be async 2025-12-01 15:29:24 +01:00
Kenneth Skovhede 212d6b1148 Fixed getting a better default support result for pass
Better output on info command
Fixed delay on IsSupported for libSecret
2025-12-01 15:14:20 +01:00
Kenneth Skovhede 8b122f8adf Fixed build issue 2025-12-01 14:51:31 +01:00
Kenneth Skovhede 5f8a5bded6 Report supported status for secret provider 2025-12-01 13:38:41 +01:00
Kenneth Skovhede 6d9826df06 Initial implementation of write-support for SecretProviders
This updates the MacOS secret provider to use PInvoke for a more stable API than the secrets tool that was used before.
2025-11-30 23:01:57 +01:00
Kenneth Skovhede 178440f869 Fixed a number of warnings 2025-11-14 16:00:06 +01:00
Kenneth Skovhede 1ea74a3c63 Updated to .NET10 2025-11-14 15:05:39 +01:00
David Kartchner 369a24d112 Made log validation message clearer 2025-11-07 16:02:40 -07:00
David Kartchner e4798dcf66 Added further parsing validation and error messages 2025-11-07 16:00:47 -07:00
David Kartchner 4832df5e15 removed error parsing and added log count validation 2025-11-07 09:55:00 -07:00
David Kartchner afe606edb7 Display status after running backup with ServerUtil 2025-11-07 09:54:29 -07:00
Kenneth Skovhede 012aeed7de Add dynamic streaming toggle
This PR adds a dynamic property so a backend can signal if it supports streaming, based on the settings.

This is currently used for the File backend, so that toggling `--use-move-for-put` will disable streaming on the backend instead of relying on the `--disable-streaming-transfers` flag.
2025-11-03 12:48:37 +01:00
Kenneth Skovhede 6ed507c0b3 Add option to limit modules
This PR adds the option to limit the available modules to just the set of specified choices.

If no option is set, all modules are available (default).
If the option is set, only those in the list are available (whitelisting).

The options are:
- `--allowed-backend-modules`
- `--allowed-encryption-modules`
- `--allowed-compression-modules`
2025-10-17 10:01:31 +02:00