A backup can have two notions of its local database path: the stored
Backup.DBPath field and a --dbpath advanced option in its settings. The runner
computes an effective path that lets --dbpath override Backup.DBPath, so most
operations honor it. But the "Show log", "Show remote log" and "Delete database"
endpoints read Backup.DBPath directly, so when --dbpath differs they open/delete
the wrong database - "Show log" then fails with "no such table: LogData".
Add a shared Runner.GetEffectiveDBPath(IBackup) helper (same precedence as
Runner.ApplyOptions) and use it in ExecuteGetLog, ExecuteGetRemotelog and
ExecuteDeleteDb so all operations agree on the database file. Adds a unit test
for the precedence.
The database move/update endpoints are intentionally left unchanged, as they
manage the DBPath field itself.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This PR adds new endpoints to support the removal of versions and the purge-broken-files flow.
Prior to this PR a UI-user had to resort to the commandline UI and figure out how to configure the commandline tool to perform the operations.
With this update, the user can now pick "Delete versions" and will be presented with a list of versions. Any versions that are checked will then be deleted.
For the purge-broken-files, this will first run "list-broken-files" and present any broken files to the user, and then allow the user to proceed with purging the broken files.
This refactors a part of the database and adds a new "sync" command that reuses a lot of the backup logic to take a set of sources and apply them to a backend.
Unlike the backup process, the sync copies files verbatim without any encryption.
This PR changes to use relative database paths by default. The default mode is to store all databases in the same folder.
With this update, the paths stored in the server database can now be relative, in which case they are resolved relative to the datafolder.
This makes it simpler to move the data folder as the paths are not stored in full.
For new backups, relative paths are assigned.
For existing backups, the full paths are retained.
If the database path is updated manually, the path will be made relative, if it is relative to the datafolder; otherwise a full path is stored.
This fixes#6677
The SelfOnly mode was removed as was the "removeAdditionalSources" logic. Instead, the new SelfLimited mode always removes sensitive information, such that by default we do not store any sensitive information, not even with encryption enabled.
This is required to avoid accidentially leaking secrets found in remote sources, or the target url, in case the leak happens somewhere else than on the remote destination.
Additionally, this resolves an issue where remote source information could leak via the DisplayNames property.
To reduce logic bugs a separate ResolvedTaskConfigMode extracts the 3 different dimensions of the selection, and a test is added to ensure it behaves as expected.
When performing searches on some remote source, like MS365, the actual file paths are not meaningfull to the user. Instead, the UI will display metadata that makes it easier to navigate.
This PR updates the search feature to optionally look in metadata and find matches there as well, making it simpler to work with such data.
This PR revives the `store-task-config` option that was never shown in the user interface and extends the feature to allow more flexibility in exporting the configurations.
The `Auto` setting is now on by default. For encrypted backups, this will store the backup configuration of the current backup with the backup for easy restore of a configuration.
For unencrypted backups, nothing will be stored by default.
To manually pick the what backup configurations are stored, the following options are also available:
- None: no configuration is stored
- Self: The configuration of the current backup is stored
- All: The configurations of all backups are stored
If the backup is not encrypted, the data is stored without any secrets (encryption keys, passphrases, passwords, api-keys, etc).
To override this, the following two options are also present:
- SelfWithForcedSecrets
- AllWithForcedSecrets
Using one of these when encryption is enabled has no additional effects, but for unecrypted backups this will include all secrets in the backups in plain-text.
This fixes#6256
This fixes#3073
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.
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.
This updates ngclient to 225, and also adds `--duplicati-webservice-suppress-welcome-page` to automatically disable the welcome page that is shown on new installs.
This modifies the `newbackup.json` embedded file that specifies how to configure a new backup to no longer set the compression module or the dblock-size.
These options have a default value already defined, so there is no need to store the settings in the database.
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".
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.
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.
This PR fixes an issue where the callback for updating the usage reporter was not correctly registered.
The effect of this was that settings changes should update the usagereporter (disabling or setting the level), but due to the missing callback settings were not applied until the server restarted.
With this fix, the settings are applied immediately.
This PR extends the search API to allow versions to be added so searching can be limited to specific versions.
Before this PR, only time was supported, but this is picking versions older than the timestamp as well.
In some cases the database update can fail, and this could leave the transaction open.
Eventually, it will be collected and the transaction disposed so it will be sorted, but in the meantime attempts to save settings will fail as SQLite does not support multiple active transactions.
This PR adds failure dispose of the transactions in a few places to ensure failures does not cascade outside the original failure.
The logic is now that the properties for each of the server settings are defined on the constant that triggers them, instead of splitting it across the API and internal database.
This makes it less error prone to introduce newsensitive server settings.
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.