Commit Graph
93 Commits
Author SHA1 Message Date
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 4ecb85d2de Added task metadata
This adds the task start and finish time.

The tracking of completed tasks has been moved to a separate service to reduce the use of FIXMEGlobal.
2025-05-02 15:11:34 +02:00
Kenneth Skovhede ab6ef6c60b Fixed minor issues with the listing method 2025-04-30 16:11:46 +02:00
Kenneth Skovhede 2f0a5af416 Implemented a new API for the new list operations.
The new API avoids using HTTP status codes and verbs.

Added new structure for having a similar response envelope and pagination support for V2 calls.

Added extensions to the systemInfo call so the client knows if the V2 methods are available.
2025-04-29 14:41:51 +02:00
Kenneth Skovhede 385581a16c Fixed minor issue with clearing metadata 2025-04-25 17:32:52 +02:00
Kenneth SkovhedeandGitHub af9465d8e3 Merge pull request #6187 from duplicati/feature/fix-throttle-speeds
Fixed throttle support
2025-04-25 15:36:44 +02:00
Kenneth Skovhede ba298df915 Added an upgrade command to the database tool 2025-04-25 12:30:03 +02:00
Kenneth Skovhede a0ecc5e05d Added a database downgrade tool 2025-04-24 16:36:14 +02:00
Kenneth Skovhede f393c00030 Fixed throttle support
This moves the throttle support to the StreamUtil throttled stream, which allows multiple streams to share a throttle value, such that the throttle setting is applied to the entire communication from Duplicati, and not for each connection.

This also cleans up a bit in the progress reporting, where the backend manager now keeps track of the "active" transfer and only emits progress on that. Once it finishes, a new transfer is promoted a "active".
2025-04-22 22:54:48 +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 055ec31d76 Introduced a PackageRef project to force updated packages to be used throughout the solution. 2025-04-16 16:38:21 +02:00
Kenneth Skovhede eaed3b7ca9 Updated the caching package 2025-04-16 16:01:44 +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 f0f68dfebf Fix locale-sensitive time parsing
On some locales, odd strings would parse as valid full dates, causing relative dates to be incorrectly calculated.

This commit fixes the issues and revisits the DST aware calculations with more tests.
2025-04-08 23:38:36 +02:00
Kenneth SkovhedeandGitHub cfc322c629 Merge pull request #6122 from duplicati/feature/remove-positional-sql-arguments
Remove positional arguments from SQL queries
2025-04-04 11:49:36 +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 d12b57cb71 Add support for pre-authenticated headers
This adds support for providing a custom defined token instead of using the JWT tokens.

The intended use is for deployments where the authentication is provide by a different layer (a proxy service).
2025-03-28 13:47:27 +01:00
Kenneth Skovhede 2b06faaf4f Added simple sorting support to backend 2025-03-26 15:58:06 +01:00
Kenneth SkovhedeandGitHub 4f81771681 Merge pull request #6085 from duplicati/feature/report-current-update-channel-in-reports
Added metadata to reports to report current update channel
2025-03-25 16:36:50 +01:00
Kenneth Skovhede b754caccc3 Added metadata to reports to report current update channel 2025-03-25 12:34:54 +01:00
Kenneth Skovhede 1a38df7709 Cleaned up some callbacks to not use events with async methods.
Implemented argument validation for the TrayIcon and server startup.
2025-03-25 11:14:03 +01:00
Kenneth Skovhede 10359cb5b3 Add guards to startup interval
In some cases the stored database state would be misinterpreted causing abnormal wait periods that crashes the program on startup.

This change converts all time compares to UTC asn the database value was already UTC.

It also adds a clamping function to prevent crashes on extreme values (using 24h pause instead of crash).
2025-03-19 09:14:34 +01:00
Kenneth SkovhedeandGitHub 07b5b0188d Merge pull request #5998 from duplicati/feature/support-remote-log-configuration
Added support for handling control messages.
2025-03-05 16:53:58 +01: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 c61cc778a8 Log remote filesets
This commit adds the number of known remote filesets to the log output.
2025-02-28 11:18:23 +01:00
Kenneth Skovhede 11a27042bc Merge remote-tracking branch 'origin/master' into feature/alternate-source-provider 2025-02-26 19:25:46 +01:00
Kenneth Skovhede bf80845292 Fixed a rare startup error 2025-02-19 15:46:22 +01:00
Kenneth Skovhede 9501470d0d Added listen interface to startup message 2025-02-14 11:28:22 +01:00
Kenneth Skovhede bb3ea2f6cd Fixed a rare startup issue 2025-02-09 11:05:54 +01:00
Kenneth Skovhede da1f6562ea Added option to log to console 2025-02-09 10:29:04 +01:00
Kenneth Skovhede abe79b1a15 Added option to disable update check
This fixes #3983
2025-02-06 11:50:38 +01:00
Kenneth SkovhedeandGitHub 28e3fa1063 Merge pull request #5914 from duplicati/feature/prevent-windows-subfolder-storage
Improve data folder assignment
2025-01-31 14:52:45 +01:00
Kenneth Skovhede fac866a5cd Merge remote-tracking branch 'origin/master' into feature/add-support-for-cors 2025-01-30 08:39:15 +01:00
Kenneth SkovhedeandGitHub 039e1a08fb Merge branch 'master' into feature/prevent-windows-subfolder-storage 2025-01-28 08:58:26 +01:00
Kenneth SkovhedeandGitHub 32d4c76c13 Merge pull request #5913 from duplicati/feature/more-visible-warnings
Added UI warning for unencrypted database
2025-01-28 08:57:08 +01:00
Kenneth SkovhedeandGitHub 610f3b47d1 Update reporting module (#5910)
* Updated reporting values.

The reporter module can now emit the following extra values:
- operating-system
- installation-type
- destination-type
- next-scheduled-run

When running from the built-in scheduler, it will automatically set `--next-scheduled-run` so it is applied to the reporting data.

* Implemented an improved machine name reader.
This fixes #5907

* Added a guard against sending too much of the destination url as the destination.

* Fixed reading Windows Machine name

* Removed extra Windows logic as it has no effect
2025-01-28 08:56:42 +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 c05b00ae0b Implemented support for avoiding storing data in the Windows folder 2025-01-27 11:49:17 +01:00
Kenneth Skovhede bee1f141ea Added UI warning for unencrypted database 2025-01-27 08:52:06 +01:00
Kenneth SkovhedeandGitHub 6a8edd75dc Added additional folders to MacOS. (#5899)
This adds the common "Movies" and "Public" folders to the list of special folders for MacOS (and Linux, if applicable)
2025-01-25 12:42:16 +01:00
Kenneth SkovhedeandGitHub 997891525a Updated license-updater to update csproj files (#5898)
* Updated license-updater to update csproj files

* License updates
2025-01-22 21:04:19 +01:00
Kenneth Skovhede 04205d5084 Added support for CORS 2025-01-18 11:03:52 +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 SkovhedeandGitHub 22bdcecfd4 Fixed a minor race where the thread could start before the worker is initialized. (#5817) 2024-12-28 19:58:20 +01:00
Kenneth SkovhedeandGitHub 68627c06bf Feature/alternate windows eventlog (#5784)
* Improved Windows Eventlog support.

Added support for logging to a different log with a Log:Source format.
Backwards compatible by treating "Source" as "Application:Source", where "Source" is default "Duplicati".

* Changed default log-level for eventlog to `Warning`.
This fixes #5770

* Fixed issue where checking for event log would crash the process.
Changed default log to `Duplicati` (was `Application`).
New default source names for service, agent and server.

* Reverted windows log-level back to information, now that there is a separate log for it

* Using "Duplicati 2" as the log name because "Duplicati" may be registered as a source name.

* Attempt to stop service before uninstalling

* Added additional diagnostics messages

* Fixed bug with starting the agent as a service

* Default to not use WindowsService for Agent as it requires permissions to create the event log

* Reduced log message levels for ongoing communication in agent

* Prevent double-logging from agent into Windows EventLog

* Made the agent log under a separate log source name
2024-12-20 16:09:42 +01:00
Kenneth SkovhedeandGitHub ff1b2b7990 Simplified task control (#5753)
* Simplified task control by having all logic in a single class and using async control mechanism
* Fixed the tests
* Made the marking of a backup partial explicitly communicated if the enumeration process is stopped.
* Added support for pausing active transfers
* Introduced transfer token to abort operations.
* Updated the way LiveControl is emitting events.
* Retains the paused state of the server across reboots, this fixes #5760.
* Reworked the way throttle speeds are propagated through LiveControls.
* Added option to pause transfers in the UI.
* Removed throttle settings from the LiveControls class so it is exclusively handled by the ApplicationSettings.
* Removed `thread-priority` as it does not work at all when tasks are used.
* Fixed the stop dialog and API to only support stop and abort.
* Removed unused variables
2024-12-18 08:27:59 +01:00
Kenneth Skovhede c9665da91b Reworked the tokens to only support emitting a single token per server startup 2024-12-12 11:05:09 +01:00