Commit Graph
652 Commits
Author SHA1 Message Date
Kenneth Skovhede 11a27042bc Merge remote-tracking branch 'origin/master' into feature/alternate-source-provider 2025-02-26 19:25:46 +01:00
Kenneth Skovhede 704485176a Clarified the Path parameter 2025-02-24 13:56:28 +01:00
Kenneth Skovhede 1428d8cc6f Preserve order of input sources 2025-02-24 12:53:48 +01:00
Kenneth Skovhede 26bbe6a577 Added setup step for source providers.
This enables a fail-early approach, where the remote source loads the initial results.
By storing the `IAsyncEnumerable` it is possible to not perform any additional remote calls, even with the initial probing call.

This makes it possible to detect the absence of sources, so the backup can be aborted if sources are missing.
2025-02-24 12:50:58 +01:00
Kenneth Skovhede 9dfe977d3f Changed logic so the source providers are now logically mounted into the source directory structure.
This fixes the restore issues as all sources will now appear as if they were originally part of the source file system.

The backend implementation has now been simplified so the backends only return names of entries with no path information.  Most backends already do this, but the S3 backends did not, so this was fixed as well.

This also clears up the interfaces, so the backend does not know about the `ISourceProviderEntry`. All mapping is done by the `BackendSourceProvider`, making it simpler to support other backends as sources.
2025-02-21 16:06:55 +01:00
Kenneth Skovhede 1716d09b51 Fixed source providers for S3, CIFS, and SSH.
Made the SMBShareConnection slightly more robust.

Introduced v2 List API to S3 backend, currently it retains v1 as the default.

Changed S3 backends to not recurse, potentially making smaller listings. This option can be disabled if it breaks things.

Added support for relative paths in the SSH backend.
2025-02-21 13:20:52 +01:00
Kenneth Skovhede 80d60c0982 Fix Uri ToString()
Fixed a case where an extra leading slash would be removed when converting a parsed Uri back to a string.
2025-02-19 22:23:53 +01:00
Kenneth Skovhede 6bbc93b8df Merge remote-tracking branch 'origin/master' into feature/alternate-source-provider 2025-02-16 16:37:12 +01:00
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 f22026cf59 Fixed a compile issue with older SDKs 2025-02-09 10:52:47 +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 SkovhedeandGitHub 198b6dcd3f Merge pull request #5929 from duplicati/feature/fix-parsing-flags
This adds the option to parse flags, where an enum can have multiple values
2025-01-31 14:52:18 +01:00
marceloduplicatiandGitHub 03b7fac65c Merge pull request #5889 from marceloduplicati/feature/unified-help-arguments
Help Command unification
2025-01-30 10:23:10 -03:00
Kenneth Skovhede bc8f6dd0c8 This adds the option to parse flags, where an enum can have multiple values.
It is only used by the FTP backend.
2025-01-30 10:52:17 +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 039e1a08fb Merge branch 'master' into feature/prevent-windows-subfolder-storage 2025-01-28 08:58:26 +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 d99f74ed94 Rewrite the backend manager. (#5896)
* Rewrite the backend manager.

This creates a new more logic backend manager that handles all backend operations.

For each top-level operation, there is now a single backend manager instance that is passed to sub-commands.

The internals of the backend manager are now rewritten to use async logic instead of threading.

The design uses a single task runner that dispatches operations and honors concurrent settings and limits from one place.

The logic for each operation has been moved into a separate files/classes to make it easier to understand each operation.

This fixes #5804

* Fixed a few issues with not awaiting tasks

* Fixed not creating empty databases

* Fixed an issue with hashes not being recorded on download

* Reworked the download logic to avoid attempting to decrypt the file if it has been modified.

* Review fixes

* Renamed db collector to better reflect the purpose.

* Review fixes
2025-01-28 08:54:50 +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 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
Marcelo C. cee1b8428d Centralizing the check on Helper function. 2025-01-21 12:45:53 -03:00
Marcelo C. 2e502ea7be Help Command unification
All CLI tools and executables now accept a unified set of help command variants:

"help", "/help","--help", "usage", "/usage", "--usage", "/h", "-h"

Affected executables:

Duplicati.Agent
Duplicati.CommandLine
Duplicati.CommandLine.AutoUpdater
Duplicati.CommandLine.BackendTester
Duplicati.CommandLine.BackendTool
Duplicati.CommandLine.ConfigurationImporter
Duplicati.CommandLine.SecretTool
Duplicati.CommandLine.Snapshots
Duplicati.GUI.TrayIcon
Duplicati.Server
Duplicati.Service
Duplicati.WindowsService

Note that SharpAesCrypt command is not included in this because the parameter parsing is part of the SharpAesCrypt code base.
2025-01-17 14:00:14 -03: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 9c808e07b3 Correctly formatting size strings as Kikibytes. This fixes #3685 (#5778)
Note: This may cause issues for scripts that parse the string as opposed to using the numeric values.
2025-01-10 09:25:40 +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 5363bf0d96 Implemented read-write timeout.
This fixes #5725
2024-12-10 22:12:20 +01:00
Kenneth SkovhedeandGitHub 0620c38fde Merge pull request #5731 from duplicati/feature/support-kikibytes-size-suffix
Support kiki-bytes suffix
2024-12-05 12:27:08 +01:00
Kenneth SkovhedeandGitHub 58a5fc57f4 Implemented support for emitting intermediate certificates from pfx (#5739)
* Implemented support for emitting intermediate certificates from pfx files

* Added certificate check to crash earlier

* Fixed loading certificate on Windows
2024-12-05 10:34:10 +01:00
Kenneth Skovhede 6e00c16fb7 Fixed parsing of the kikibytes suffix 2024-12-04 22:43:47 +01:00
Kenneth Skovhede da13191475 Support kiki-bytes suffix 2024-12-03 13:04:27 +01:00
Kenneth Skovhede 0a5baa127c Merge remote-tracking branch 'origin/master' into feature/fix-dst-changing-scheduled-time 2024-11-25 13:05:28 +01:00
Marcelo Ceccon 4beafc0cc7 Added pCloud Integration
Added pCloud backend with custom interface for editing destination.
2024-11-18 13:07:01 +01:00
Kenneth SkovhedeandGitHub c96d2e0b7c Merge pull request #5655 from marceloduplicati/feature/warnings-cleanup-lowimpactwarnings
Further progress on removal of build warnings.
2024-11-08 10:54:57 +01:00
Kenneth Skovhede 2c63c0d9e8 Fixed loading slowness, caused by AmazonSecretManagerConfig performing network queries on property access. 2024-11-08 10:05:55 +01:00
Marcelo Ceccon d4d9c47824 Further progress on removal of build warnings.
None of these changes have impact on code execution, they are mainly part of the effort to remove all build warnings.

The removal of Thread.ResetAbort leaves a TODO for us to integrate CancelationToken when it gets propagated down here on future changes.
2024-11-07 18:02:15 +01:00
Kenneth Skovhede 74bb22e022 Implemented support for keeping time-of-day stable across daylight savings time changes.
This fixes #1364
2024-11-05 21:26:30 +01:00
Kenneth Skovhede 8250a5befa Refactored SecretProviderHelper to replace in Uri instances instead of raw string.
This fixes some issues with URL encoding/decoding.
Due to the legacy class `Duplicati.Library.Utility.Uri` there are two replacements done.
2024-11-04 15:57:56 +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 aca02f0801 Fixed upgrade path with insecure passwords 2024-10-30 10:39:48 +01:00
Kenneth Skovhede d8a98049eb Added safeguard to avoid leaking the server key 2024-10-29 14:01:07 +01:00
Kenneth Skovhede 56816abed8 Reverted to not storing the certificate as a file, since the x509Certificate loader was the broken part, not Kestrel. 2024-10-29 13:55:12 +01:00
Kenneth Skovhede e914794b30 Simplified running TrayIcon with self-signed certificate.
Added workaround method to avoid loading certificate directly as that crashes .NET with EC-based keys.
2024-10-29 13:28:44 +01:00
Kenneth Skovhede e690364a47 Added licenses 2024-10-28 08:08:29 +01:00
Kenneth Skovhede 34d13a20e2 Initial version of the external secret provider 2024-10-24 16:06:59 +02:00
Marcelo Ceccon fd591d9af2 Fix to Webdav issue around certificate validation
Fix to Webdav to process the options accept-specified-ssl-hash and accept-any-ssl-certificate

Minor refactoring
2024-10-10 10:36:47 +02:00
Kenneth Skovhede 454b1bb93b Merge remote-tracking branch 'origin/master' into feature/backend-async-get 2024-10-04 09:11:50 +02:00
Kenneth Skovhede ef0ca64d52 Merge remote-tracking branch 'origin/master' into feature/remote-control-support 2024-10-03 14:49:07 +02:00
Kenneth Skovhede 0252ebc985 Added TODO to AsyncHttpRequest 2024-10-03 14:14:16 +02:00