Commit Graph
781 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 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 5a4fcaa6d7 Added tool to work with remote sources 2025-02-21 11:51:45 +01:00
Kenneth Skovhede 0f9669b273 Final conversion to async backends
This PR is the final change, where all backends are now purely implemented with async interfaces.

The code changes here replace the LIST call with an async version. This affect all backends (and then some) but the changes are mostly mechanical rewrites of the code.

In many places, the backeds were already prepared for async output, in other some glue was needed.

To reduce the scope of this change, some backends simply report a synchronous result as an async list.
2025-02-17 16:45:51 +01:00
Kenneth Skovhede aab91eb0df Added protection to newly create data folder and databases 2025-02-06 16:56:06 +01:00
marceloduplicatiandGitHub 3a604998e2 Merge pull request #5921 from duplicati/feature/backend-tester-improv
Change timeout configuration for BackendTester
2025-02-03 17:44:17 -03: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
marceloduplicatiandGitHub 03b7fac65c Merge pull request #5889 from marceloduplicati/feature/unified-help-arguments
Help Command unification
2025-01-30 10:23:10 -03:00
Marcelo C. 0fca2ba96b Changing default streaming timeout from 10 to 60 seconds 2025-01-29 20:37:40 -03:00
Marcelo C. 36db29dc77 Change timeout configuration for BackendTester
This change will allow an environment variable READ_WRITE_TIMEOUT_SECONDS to control the read write timeout used during the tests on streaming backends.

-1 will set it to infinite.

Additionally all console logs during test execution have a timestamp with millisecond precision to aid in benchmarking.
2025-01-28 10:35:32 -03: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 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 97d62163c5 Renamed methods for database path to better distinguish what they do 2025-01-27 11:46:24 +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
Marcelo C. adc4bfa650 Added timers to backend testing tool
Also changed logic around test result, ensuring it fails when any unexpected behavior happens.
2025-01-17 09:45:49 -03:00
Kenneth SkovhedeandGitHub e9aa8717fc Improve ServerUtil (#5860)
* Improve the ServerUtil

Added `status` command to show server state

* Added support for waiting on a backup after starting it
2025-01-09 14:48:00 +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 447c2b3238 Feature/improve ci testing (#5781)
* Added options to insert delays in backend tester

* Added wait delays to Azure and GoogleDrive to see it the CI is more stable with small delays

* Added more debug output to the backend tester

* Fixed dropbox reporting OAuth quota errors, when it is likely Dropbox API quota errors

* Implemented exception detection on AzureBlob backend

* Also showing sleep times in output

* Fixed a bug with the dropbox quota response

* Fixed error message to report correct number of files

* Fixed suppressed warning
2024-12-20 16:10:08 +01:00
Kenneth SkovhedeandGitHub 86f3f6b178 Fixed issues with timeout in msgraph (#5790)
* Fixed issues with timeout in msgraph

Fixed a place where the cancellation token was not applied.

Fixed a problem with msgraph not sending correct DNS information.

Fixed a problem with msgraph downloading the entire file before streaming it, bypassing throttle and tripping the timeout.

Added `ITimeoutExemptBackend` to selectively disable timeouts for backends that do not support it.

Updated the backendmanager to support `ITimeoutExemptBackend`.

Updated the backendmanager to abort as soon as a timeout happens.

* Updated BackendTester to use the `TimeoutObservingStream` and support the `--read-write-timeout` setting.

Updated backend tester code to use `var`

* Fixed a bug reading the `read-write-timeout`

* Updated to using constants with names instead of `-1`.
2024-12-19 09:31:06 +01:00
Kenneth Skovhede feeda8d9dc Formatted the output for generating a forever token 2024-12-12 11:07:40 +01:00
Kenneth Skovhede 7d4f9ffab3 Implemented a forever-token feature 2024-12-12 08:59:59 +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 2b5bb6a4ec Logging unobserved task exceptions 2024-11-29 08:42:43 +01:00
Kenneth Skovhede c6ee74aec3 Added minor update to the email CLI help 2024-11-06 13:29:13 +01:00
Kenneth Skovhede a72bf27aa3 Merge remote-tracking branch 'origin/master' into feature/add-secret-provider 2024-11-05 11:48: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 57c8c025d1 This fixes an issues with the recovery tool that would mangle names if no encryption module is set on the source files.
This uses a test provided in #4490 to verify.
This fixes #4490
2024-11-01 17:01:30 +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 3833f7abf5 Made the auto-cert detection disabled if the user supplied the cert hashes. 2024-10-31 12:04:24 +01:00
Kenneth Skovhede d9953852ad Fixed compile errors on Windows 2024-10-30 10:51:32 +01:00
Kenneth Skovhede ff25d91663 Simplified code a bit.
Added support for multiple cert-hashes.
Made `server-util` auto-detect hashes as well.
2024-10-29 14:38:23 +01:00
Kenneth Skovhede e690364a47 Added licenses 2024-10-28 08:08:29 +01:00
Kenneth Skovhede 9a89ca5a15 Cleaned up the use of the default pattern to use a single const value.
Added support for inheriting the secret pattern as it is more logical that all settings are carried through to the application.
2024-10-26 08:37:26 +02:00
Kenneth Skovhede 7bbdb9afac Fixed Windows compile errors 2024-10-25 23:46:43 +02:00
Kenneth Skovhede 352e049b84 Improved exception messages 2024-10-24 21:20:02 +02:00
Kenneth Skovhede 1ac26d7600 Added support for secret provider in server-util 2024-10-24 16:52:44 +02:00
Kenneth Skovhede f7e473e67e Fixed signature and nullability issues 2024-10-24 16:52:09 +02:00
Kenneth Skovhede 34d13a20e2 Initial version of the external secret provider 2024-10-24 16:06:59 +02:00
Kenneth Skovhede 6ab27cb870 Merge remote-tracking branch 'origin/master' into feature/backend-async-get 2024-10-03 13:22:36 +02:00
Kenneth SkovhedeandGitHub c3c0ad9fca Merge pull request #5562 from duplicati/feature/remove-thread-culture-dependence
Avoid setting Thread.CurrentCulture
2024-10-02 22:53:47 +02:00
Kenneth Skovhede 61ea36091a Added DNSNames as async 2024-10-02 09:37:52 +02:00
Kenneth Skovhede 586c08522e Implemented async method for Test, CreateFolder and Quota in all backends.
Still missing the List and DNSHostnames.
The AsyncRequest class is also preventing many backends from fully upgrading.
2024-10-01 09:30:02 +02:00
Kenneth Skovhede 8bdb85e261 Implemented RenameAsync on all backends supporting rename 2024-09-29 23:21:50 +02:00
Kenneth Skovhede ecf2e8b551 Implemented DeleteAsync on all backends 2024-09-29 23:04:54 +02:00
Kenneth Skovhede e3e3d1305f Implemented async version of Get for all backends. 2024-09-29 22:00:57 +02:00
Kenneth Skovhede f3e2a0a902 Avoid setting Thread.CurrentCulture
Avoids setting deprecated `Thread.CurrentCulture` and `Thread.CurrentUICulture`, using `CultureInfo.CurrentCulture` instead.
Fixed a few legacy places where incorrect string compares were used.
2024-09-18 09:24:55 +02:00
Kenneth Skovhede e3579312e2 Added healt checks to server.
Added health command to server-util.
This fixes #5560
2024-09-17 14:01:08 +02:00