Commit Graph
685 Commits
Author SHA1 Message Date
Kenneth SkovhedeandGitHub fcaeea4245 Merge branch 'master' into feature/fix-decoding-windows-paths 2025-03-25 08:55:06 +01:00
Kenneth Skovhede c5d5bb356d Also expand paths with file:// prefix 2025-03-24 20:56:32 +01:00
Kenneth Skovhede 53ee9526ca Fixed some nullability warnings 2025-03-24 17:10:15 +01:00
Kenneth Skovhede a685c6c4e5 Fixed URL parser not treating file://C:\path the same as C:\Path.
This fixes #6071
2025-03-24 11:35:04 +01:00
Kenneth Skovhede 631c80d6a8 Cleaned up some option names 2025-03-24 10:17:26 +01:00
Kenneth Skovhede 9d617fe08a Updated TahoeLAFS 2025-03-24 09:15:49 +01:00
Kenneth Skovhede fc927b881f Updated rclone backend 2025-03-22 08:08:54 +01:00
Kenneth Skovhede 9cecee04b9 Updated pCloud 2025-03-21 17:01:37 +01:00
Kenneth Skovhede edb4747181 Merge commit 'ae59ed294f6511ca014386d30c48eaabd27aca5b' into feature/improve-auth-parsing-helper 2025-03-21 10:06:10 +01:00
Kenneth Skovhede 769158c3f0 Upgraded CloudFiles 2025-03-21 10:05:33 +01:00
Kenneth Skovhede 41d2b22015 Adde option names to helper 2025-03-21 09:13:48 +01:00
Kenneth Skovhede a163f53dba Handle stop exceptions
This adds a common way to catch stop exceptions and handles them so error resilient logic does not continue when a stop exception is thrown.

Previously, the logic would only check for `ThreadAbortException` which was used to signal a stop prior to .NET8.
2025-03-20 22:32:04 +01:00
Kenneth Skovhede be8de849fb Mapping timeouts to correct exceptions 2025-03-20 12:02:09 +01:00
Kenneth Skovhede 0247f13ebf Updated box.com 2025-03-20 11:17:35 +01:00
Kenneth Skovhede d1659b7d40 Fixed FTP credentials not being parsed 2025-03-20 10:15:27 +01:00
Kenneth Skovhede 7405bab68f Simplified working with the options helpers 2025-03-19 23:16:37 +01:00
Kenneth Skovhede 6cad935656 Common parsing for auth options 2025-03-19 22:40:09 +01:00
Kenneth Skovhede 8f38c82f1e Changed order of function arguments for improved readability 2025-03-19 15:48:01 +01:00
Kenneth Skovhede 6c7843b332 Unified options
This PR adds a unified way of supplying timeouts to each of the backends.

It also adds an opt-in way of adding commonly used options, so parsing and usage can be standardized across multiple backends.
2025-03-19 15:27:02 +01:00
Kenneth Skovhede e37f20aedd Added retries for HTTP messages
This adds a retry count and a retry delay for posting backup reports via HTTP requests. This will make the report delivery more reliable if the network is unstable or server is briefly unreachable.
2025-03-16 16:52:30 +01:00
marceloduplicatiandGitHub 35da99c64c Merge pull request #6041 from marceloduplicati/feature/scan-root-certificates
Re-work of SSL Validation + Root Certificate feature
2025-03-14 17:44:41 -03:00
Marcelo C. 12f53513d0 Re-work of SSL Validation + Root Certificate feature
Initially the idea was to allow scanning not only the certificate but scan the whole certificate chain for a explicitly supplied hash to be accepted unconditionally.

A review of the validation revealed it was always missing a fallback to the certificate.verify()

Also decided that even when a hash is supplied and matched, the validity date supersedes other criteria except the acceptAll.
2025-03-14 12:09:01 -03:00
Kenneth Skovhede bb1aa8e1f7 Cosmetic cleanup
Removed superfluous namespaces.
Using `var` most places.
Using extension methods for common setup of commands.
2025-03-14 14:34:56 +01:00
Kenneth Skovhede f342d70819 Implemented forced invariant locale on all SQL strings.
This fixes #6023
2025-03-13 23:06:32 +01:00
marceloduplicatiandGitHub 4268eda62d Merge pull request #6030 from marceloduplicati/feature/use-ipv4-v6-auto
Integrating the IPv6 & IPv4 detection
2025-03-12 12:19:04 -03:00
Kenneth SkovhedeandGitHub eac394f0a3 Merge pull request #6011 from duplicati/feature/improved-failure-resilience
Improved failure resilience
2025-03-12 14:48:14 +01:00
Marcelo C. b035c69e4d Integrating the IPv6 & IPv4 detection
It should be noted that I was unable to completely remove IPv4 on Windows 11 to a state where it would not provide the 127.0.0.1 loopback, even when disabling Ipv4 in various ways, including with registry flags.

On ubuntu/linux, after completely disabling ipv4 the ipv6 loopback was returned.
2025-03-11 16:24:15 -03:00
Kenneth Skovhede be16323f24 General cleanup, common database validation exception 2025-03-10 14:38:45 +01:00
Carl Johnsen f77fcc186c Merge remote-tracking branch 'upstream/master' into bugfix/restore-deadlock 2025-03-10 05:50:26 +01:00
Kenneth Skovhede 29021e9255 Remove call context in favor of AsyncLocal
This removes the use of the `CallContext` substitute, which was a compatibility class from .NET4 times, and replaces it with `AsyncLocal` which retains the call state.
2025-03-07 11:57:36 +01:00
Marcelo C. 2118bd5917 Adding ParseIntOption 2025-03-04 09:23:53 -03:00
Carl Johnsen ab25608616 Remove whitespace 2025-03-03 17:20:57 +01:00
Carl Johnsen 7c41949e9e Disposing a TempFile through finalizing now gives a warning, as this should have been done by the instantiating entity. 2025-03-03 17:20:50 +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 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