Commit Graph
47 Commits
Author SHA1 Message Date
Kenneth Skovhede 218304c971 Handle immediate usagereporter update
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.
2026-05-08 15:42:38 +02:00
Kenneth Skovhede 5d4a15aad0 Fixed a settings save bug
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.
2026-04-21 14:50:30 +02:00
Kenneth Skovhede c0f40e19ca Updated copyright year to 2026 across the project 2026-04-16 15:21:24 +02: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 ab82719a6b Improved license key support
Added support for reporting the license key details in SystemInfo.

Added support for loading a key via the console connection, if used.
2026-02-20 10:39:51 +01:00
Kenneth SkovhedeandGitHub 8cf2154037 Merge pull request #6768 from duplicati/feature/add-google-workspace-backup
Add support for Google Workspace backup
2026-02-20 08:56:40 +01:00
Kenneth Skovhede 94d272e734 Added support for also storing the connectionstringId for additional target urls 2026-02-19 10:41:27 +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 Skovhede 3bc449281a Similar naming on modules.
Added sourceprovider/destinationprovider to list of collected password fields
2026-02-15 10:42:19 +01:00
Kenneth Skovhede 9dd6dba0c2 Merge remote-tracking branch 'origin/master' into feature/add-destination-repo 2026-02-05 10:26:45 +01:00
Kenneth Skovhede e009a0f3ec Remote source masking and encrypting
This PR adds masking to remote sources so the passwords are not leaked to the browser. The logic works the same as for TargetURL, where the sensitive fields are replaced by a password placeholder before being transmitted via the endpoints.

When data returns, the masking is removed by looking at the original source and the unmasked value is then encrypted before being stored in the database.

Since the sources is an array and not just a single field, the logic here uses the mount point as a "key" for figuring out which new sources map to the original sources. This is robust in the face of re-ordering, deletions and additions.

If there is just a single remote source (assumed most common) this will match even if the prefix does not, making it possible to change the prefix in this case.

For multi-remote sources, it is not possible to change the prefix without also re-typing all masked properties.

If there is a need later, we could extend the matching to look for how many unique protocols are there, and maybe servers as well to try to match better when the prefixes have been renamed.

There is a guard right before saving a source that rejects it if the source contains the placeholder so we ensure that even faulty logic cannot persist an invalid connection string.
2026-01-30 14:36:57 +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 ff92837677 Fixed a missing event on settings update
When updating the server settings, the server would not emit the new settings on save, causing the UI to be inconsistent if websocket is active.

This happened primarily when saving advanced options.
2026-01-27 21:40:13 +01:00
Kenneth SkovhedeandGitHub 965618ba23 Merge pull request #6678 from duplicati/feature/duplicati-storage-backend
Duplicati storage server backend
2025-12-12 10:36:47 +01:00
Kenneth Skovhede 723e05ea4c Call VACUUM on the DB on password change
This PR adds a VACUUM call to the database after encryption has changed. This is done to ensure any non-encrypted data is scrubbed and not present in unused pages after encryption is applied.
2025-12-04 16:27:31 +01:00
Kenneth Skovhede 0ca2d52008 Added support for new server control messages 2025-11-27 08:54:33 +01:00
Kenneth Skovhede d39f6f4719 Temporary backups return deep copies
This PR fixes an issue with restore from config that would mask the internal objects passphrase and cause all requests to fail due to invalid passphrase.
2025-11-03 19:03:16 +01:00
Kenneth Skovhede 55478523aa Fixed masked passwords breaking test function
This updates the masked password feature to be better at detecting variations of the password mask, such as removing one or more asterisks from the string.

This also updates the "Test destination" endpoints to support a backupId so the call can unmask the target urls.
2025-09-25 13:11:39 +02:00
Kenneth Skovhede 34b6f9ea55 Implemented remotely managed backup configurations
This PR adds the ability to manage backup configurations outside of the the client.

The implementation ensures that locally created configurations cannot be affected by the remotely managed backups.

If the instance is not connected to a remote console, this has no effect.

This PR updates the local database to add the column `ExternalID` that tracks backups that are managed remotely.
2025-09-17 15:07:09 +02:00
Kenneth Skovhede 45f902594e Mask passwords to avoid leaking them in the UI
This PR adds a masking function that replaces sensitive parameters with a masking string, such that the passwords are never submitted to the client during edits.

For now, the export feature (both as JSON and as commandline) do not mask the sensitive parameters.

This fixes #2024
2025-09-04 22:03:10 +02:00
Carl Johnsen bd493638af Merge branch 'master' into performance/mssqlite-async 2025-06-02 10:39:33 +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 ee40767412 Merge branch 'master' into performance/mssqlite-async 2025-05-27 12:04:50 +02:00
Carl Johnsen a4e608d7c4 Updated transaction propagation logic, as all commands must have a transaction 2025-05-27 06:23:49 +02:00
Kenneth Skovhede 9723b78279 Fixed nullability issues 2025-05-24 13:54:59 +02:00
Carl Johnsen b399adf534 BeginTransactionSafe() was a legacy helper method that called BeginTransaction() directly 2025-05-22 13:27:36 +02:00
Carl Johnsen 37039f467e Removed whitespace 2025-05-22 13:26:55 +02:00
Kenneth Skovhede c9f985ecdd Final removal of FIXMEGlobal 2025-05-05 16:13:46 +02:00
Kenneth Skovhede 072f89c747 Remove WorkerThread class
This removes the WorkerThread class and many of the complications around it.

Instead of having a generic worker, there is now the `QueueRunnerService` which takes on all the resposibilities for handling queued tasks.

This is one step towards removing `FIXMEGlobal`
2025-05-03 15:01:09 +02:00
Kenneth Skovhede 385581a16c Fixed minor issue with clearing metadata 2025-04-25 17:32:52 +02:00
Kenneth Skovhede c3c9105d26 Fixed an issue where schedules would be invisible in the UI but still work. 2025-04-17 18:03:14 +02:00
Kenneth Skovhede faede65d8d Changed transactions to use a wrapper that ensures a transaction is allocated. 2025-04-14 12:04:00 +02:00
Kenneth Skovhede 8703f2c014 Fixed a bug with settings after sql queries were updated 2025-04-03 17:05:13 +02:00
Kenneth Skovhede 0b735d79ff More cleanup and a few bug fixes 2025-04-03 16:38:51 +02:00
Kenneth Skovhede 451c8168fc Added Connection 2025-04-03 13:59:07 +02:00
Kenneth Skovhede cbb639651a Added support for handling control messages.
This enables automatic reporting setup via remote management.
2025-03-03 17:39:25 +01:00
Kenneth Skovhede 27f0bb4ea0 Unified code to find the data folder.
The `machineid.txt` and `installation.txt` files are now default located in same folder where the database is default located.
2025-01-27 22:51:45 +01:00
Kenneth Skovhede bee1f141ea Added UI warning for unencrypted database 2025-01-27 08:52:06 +01:00
Kenneth SkovhedeandGitHub 6bbd64a655 Fixed nullability warnings in Utility.cs (#5861)
* Fixed nullability warnings in `Utility.cs`

* Fixed a number of nullability issues and warnings

* More nullable fixes

* Fixed the overwrite issue

* Fixed additional nullability issues

* Removed additional nullability issues

* More nullability fixes and added some xmldoc

* Added more xmldocs and removed an unused argument

* Removed more warnings
2025-01-14 14:03:48 +01:00
Kenneth SkovhedeandGitHub 9464caf622 Feature/update license 2025 (#5851)
* Fixed some minor whitespace issues

* Updated all copyright to 2025
2025-01-07 09:40:39 +01:00
Kenneth Skovhede 42c4e50482 Fixed issues with update detection.
This fixes a case where the update checker keeps an old reference to the previous updated version, despite running a newer version.

It also removes some use of `Assembly.GetExecutingAssembly().GetName().Version` with the information from `UpdaterManager.SelfVersion.Version` as that should follow the update info.

This fixes #5698
This fixes #5252
2024-11-25 17:27:50 +01:00
Kenneth Skovhede c99e819d70 Merge remote-tracking branch 'origin/master' into feature/add-secret-provider 2024-11-01 08:49:52 +01:00
Kenneth Skovhede 4783050d53 Simplified logic by having an option to disable https.
Simplified checks for https by having a single property that unifies the logic.
2024-10-29 11:15:06 +01:00
Kenneth Skovhede 34d13a20e2 Initial version of the external secret provider 2024-10-24 16:06:59 +02:00
Kenneth Skovhede 669e90704d Initial work on supporting a secure remote control connection. 2024-09-18 11:07:59 +02:00
Kenneth Skovhede 3548475360 Implemented preload support.
This commit adds the option to provide preload/preset options that change the default values for Duplicati's commandline or environment variables.
This fixes #5480
2024-08-28 00:18:55 +02:00
Kenneth Skovhede d1008bc7a2 Fix the Duplicati.Library.RestAPI path.
It was previously located in the root, but placed correctly in the solution file.
2024-08-27 08:30:26 +02:00