Commit Graph
23 Commits
Author SHA1 Message Date
Kenneth Skovhede 8c935a7344 This creates a new ISourceProvider interface for describing a data source.
With this interface it is possible to wrap the current support for snapshots and USN and simplify the enumeration.

This makes a number of assumptions into fields such as `IsMetaEntry` and `IsRootEntry` that removes code that was checking for various properties.

This first commit has support for VSS and USN as well as "naked" files, keeping feature parity.

There is also an experimental support for loading a backend-as-a-source. The support for this is currently limited as the backends need to be extended to support a folder concept.
2025-02-09 16:14:22 +01:00
Kenneth Skovhede fac12ba772 Further consolidated the data folder.
Added support for `--portable-mode` and `--server-datafolder` for the CLI, ServerUtil, and Agent.

Fixed a few places where file reads were not cached properly.

Moved some responsibilities of UpdaterManager into DataFolderManager.

This now supports storing `machineid.txt` and `installation.txt` inside the path pointed to by `--server-datafolder` or alternatively with `--portable-mode`.

It is possible that some fringe backwards compatibility is lost with this update.

Fixed an issue with AutoUpdater crashing on check/download.

This fixes #5902
2025-01-28 13:01:35 +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 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 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 f251d34b57 Implemented support for including the machine hostname in reports for simpler identification. 2024-10-16 16:22:47 +02:00
Kenneth Skovhede 8c0e4329f7 Fixed additional ReadOnly issues 2024-09-18 11:39:26 +02:00
Kenneth Skovhede d5f7d69f39 Added missing parenthesis 2024-05-08 12:49:37 +02:00
Kenneth Skovhede 792e1abf74 Expanded error handling when parsing a custom body for reports.
This is related to #5170
2024-05-08 11:36:42 +02:00
Kenneth Skovhede 5b9e294dec Revisiting the machine-id concept.
Removed the text from the update folder as it is no longer being used.
Added a new `machineid.txt` file that controls the machine-id.
De-coupled the machine-id from the installationid as the latter is used for usage reporting, and should not be connected to the machine-id
2024-04-29 17:58:00 +02:00
Kenneth Skovhede dab3d989e1 Added support for sending reports via HTTP(s) to multiple destinations 2024-04-24 13:16:21 +02:00
Kenneth Skovhede 62f707be6d Fixed including the machineId in reports 2024-04-18 14:07:05 +02:00
Kenneth Skovhede 9f0810612a Changed logic for reporting exceptions, so all statistics are reported despite an exception stopping the backup 2024-04-02 22:31:55 +02:00
Kenneth Skovhede 6b9165a587 Added support for machine and backup ids in reports 2024-03-07 22:11:49 +01:00
Kenneth Skovhede 40dd3c6816 Updated all license mentions to MIT 2024-02-28 15:45:30 +01:00
Kenneth Hsu 83ac03843d Fix spelling errors in comments.
In doing so, we also normalized some line endings.
2019-12-14 09:52:55 -08:00
Kenneth Hsu afab61a05b Use pattern matching to simplify casts. 2019-10-19 10:15:38 -07:00
Rune Henriksen 155123d22a added boolean check to make the json output use the subject template instead of always returning the result as a json payload 2019-05-05 23:33:50 +02:00
Kenneth Hsu 22d5328e75 Remove extra XML documentation tag. 2018-10-13 20:43:38 -07:00
Kenneth Hsu 9ce1e807c7 Remove unused variables and fields. 2018-09-29 10:41:27 -07:00
Kenneth Skovhede de84650eae Rewrote the logic for reporting JSON to avoid reporting JSON inside a text blob, but instead use an extra tag in the JSON.
The logic is currently that the template is scanned for potential values, and those that are found are reported in the extra tag for the JSON.
A bit clumsy, but allows the user to choose specific fields to include in the reported data.
2018-04-12 11:46:54 +02:00
Kenneth Skovhede 4e5f4a12bf Merge branch 'master' into feature/filters-for-sendmail
Integrated changes to support log-lines and to have a common shared module for reporters

# Conflicts:
#	Duplicati/Library/Modules/Builtin/Duplicati.Library.Modules.Builtin.csproj
#	Duplicati/Library/Modules/Builtin/RunScript.cs
#	Duplicati/Library/Modules/Builtin/SendHttpMessage.cs
#	Duplicati/Library/Modules/Builtin/SendJabberMessage.cs
#	Duplicati/Library/Modules/Builtin/SendMail.cs
2018-04-12 11:16:57 +02:00
Kenneth Skovhede 731ecfc47d Rewrote the report modules to use a shared base class with all the non-sending specific code.
Change the logic for how the log data is included. It is now added as log lines _after_ the normal messages.
Added support for limiting the number of log lines sent.
Added support for setting the log levels on the modules.
Added support for setting a log filter on the modules.
Added support for sending log data as JSON from the http module.
2018-04-10 12:58:06 +02:00