Commit Graph
11046 Commits
Author SHA1 Message Date
Carl Johnsen c19af329f4 Removed whitespace 2025-03-24 14:00:39 +01:00
Carl Johnsen e9d32acd1a Updated the CLI restore help text 2025-03-24 14:00:12 +01:00
Carl Johnsen 06cb3d70d3 Added a unit test to capture issue #6068 2025-03-24 13:59:32 +01:00
Kenneth SkovhedeandGitHub ae59ed294f Merge pull request #6067 from duplicati/feature/handle-stop-exceptions
Handle stop exceptions
2025-03-21 10:05:52 +01:00
Kenneth SkovhedeandGitHub a326b43b1d Merge pull request #6066 from duplicati/feature/remote-empty-index-files
Delete empty index files
2025-03-21 08:31:59 +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 3c741cbcfc Delete empty index files
If there are index files with no references, they will now be deleted by the repair process.

Such files are likely leftovers from an earlier version that would leave such files if various errors happened.
2025-03-20 22:21:57 +01:00
Kenneth SkovhedeandGitHub b0d20638f2 Merge pull request #6064 from duplicati/feature/reduce-serialized-results
Update serialized results to omit task control
2025-03-20 20:57:48 +01:00
Kenneth SkovhedeandGitHub 6e77079f24 Merge pull request #6062 from duplicati/feature/improve-sqlite-config
Improve SQLite loading
2025-03-20 16:06:56 +01:00
Kenneth Skovhede ddf90196cd Update serialized results to omit task control
The `TaskControl` and `TaskReader` properties contain no information that can be used in serialized form, but they were added to the output anyway.

With this commit, the unwanted extra data is no longer emitted.
2025-03-20 16:06:11 +01:00
Kenneth SkovhedeandGitHub 146a2ace51 Merge branch 'master' into feature/improve-sqlite-config 2025-03-20 12:05:28 +01:00
Kenneth Skovhede d8a15ac7ed Fixed review comments 2025-03-20 12:05:16 +01:00
Kenneth SkovhedeandGitHub 2e3f867fa6 Merge pull request #6061 from duplicati/feature/untangle-db-and-results
Untangle the results and database
2025-03-20 12:02:55 +01:00
Kenneth Skovhede fbe79b1ca3 Improve SQLite loading
This commit changes the way the new restore flow loads the extra database connections so these will also apply the temporary folder settings and custom pragmas.

This also changes the logic around the SQLite temporary folder. Previously, this folder would unconditionally be set to the general temporary folder, allowing only an override with a custom pragma.

No the setup checks if the system has the environment variable `SQLITE_TMPDIR` set already. If this variable is already set, it will NOT be overwritten.
Actual effects of this change depends on how SQLite internally resolves the temporary folder.
2025-03-20 10:05:10 +01:00
Kenneth SkovhedeandGitHub 7d8b0bd96b Merge pull request #6054 from duplicati/feature/prefer-named-parameters-in-sql
Move away from positional parameters in SQL statements.
2025-03-20 09:52:17 +01:00
Kenneth Skovhede 7f008341df Untangle the results and database
The code was using a two-way reference linking the database to the results and the results to the database.

However, this was not really used so it ended up just cluttering the code. With this commit, the results and databases are no longer keeping track of each other, and the only interaction is when the results are written to the database at the end of the operation.

To ensure result data is always written, this code has been moved into the controller, which will now flush the results for all operations. Prior to this, only some operations would write result data to the log.

The controller now also handles logic for cleaning old log data and invoking the vacuum command.

Fixed a bug due to using System.Text.Json where some attributes from NewtonSoft.Json were being applied and not picked up.
2025-03-20 09:51:49 +01:00
Kenneth SkovhedeandGitHub fb62da8fa6 Merge pull request #6059 from duplicati/feature/honor-insecure-permissions
Honor insecure permissions.
2025-03-19 23:31:16 +01:00
Kenneth Skovhede fac135d5a5 Updated restore database to not use positional arguments 2025-03-19 22:23:57 +01:00
Kenneth Skovhede 47afbbbdad Fixed a transitional issue 2025-03-19 21:42:08 +01:00
Kenneth SkovhedeandGitHub 7d94d86643 Merge pull request #6057 from duplicati/feature/unified-timeout-and-options
Unified options
2025-03-19 21:20:53 +01:00
Kenneth Skovhede fef0431144 Honor insecure permissions.
This commit changes the logic so permissions are only set on files, if the `insecure-permissions.txt` file is not found in the folder.

Prior to this commit, new files would be locked down without condition.
2025-03-19 21:20:07 +01:00
Kenneth Skovhede 833a77bcf6 Fixed a transition issue 2025-03-19 17:21:16 +01:00
Kenneth Skovhede 8f38c82f1e Changed order of function arguments for improved readability 2025-03-19 15:48:01 +01:00
Kenneth Skovhede f509c174d3 Fixed a missing = 2025-03-19 15:32:05 +01:00
Kenneth SkovhedeandGitHub 49e68292c5 Merge branch 'master' into feature/unified-timeout-and-options 2025-03-19 15:27:47 +01:00
Kenneth SkovhedeandGitHub af7bbb4164 Merge pull request #6055 from duplicati/feature/guard-livecontrol-startup-range
Add guards to startup interval
2025-03-19 15:27:26 +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 SkovhedeandGitHub 3f5705a309 Merge pull request #6053 from duplicati/feature/more-cleanup
Additional cleanup in database files
2025-03-19 09:15:31 +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 Skovhede fe1cef3be8 Move away from positional parameters in SQL statements.
This is a move away from using positional parameters in SQL statements and rok towards only using named parameters.
2025-03-18 22:41:11 +01:00
Kenneth SkovhedeandGitHub 1e84d887af Merge pull request #6049 from duplicati/feature/add-additional-file-check
Probe for additional file
2025-03-18 20:30:51 +01:00
Kenneth Skovhede 4a46918760 Additional cleanup in database files 2025-03-18 20:30:27 +01:00
Kenneth SkovhedeandGitHub b1f705f71a Merge pull request #6048 from duplicati/feature/timezone-aware-compare
Making comparison in local time
2025-03-17 14:21:47 +01:00
Kenneth Skovhede 6dc542f1fa Probe for additional file 2025-03-17 14:21:16 +01:00
Kenneth SkovhedeandGitHub 84065cb34c Merge pull request #6046 from duplicati/feature/fix-warning-icon-state
Added warning state back
2025-03-17 13:33:53 +01:00
Kenneth SkovhedeandGitHub 815ebc84df Merge pull request #6044 from duplicati/feature/retries-for-http-message
Added retries for HTTP messages
2025-03-17 13:33:31 +01:00
Kenneth Skovhede 902bd22185 Making comparison in local time 2025-03-17 13:32:39 +01:00
Kenneth Skovhede 5509693137 Added warning state back 2025-03-16 17:26:12 +01:00
Kenneth SkovhedeandGitHub 2b5aad34c8 Merge branch 'master' into feature/retries-for-http-message 2025-03-16 16:53:11 +01:00
Kenneth SkovhedeandGitHub a439d06786 Merge pull request #6043 from duplicati/release/canary-2.1.0.111
Release/canary 2.1.0.111
2025-03-16 16:52:49 +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
Kenneth Skovhede d44673c23b Version bump to v2.1.0.111-2.1.0.111_canary_2025-03-15
You can download this build from:

Binaries: https://updates.duplicati.com/canary/?version=2.1.0.111

Signature file: https://updates.duplicati.com/canary/duplicati-2.1.0.111_canary_2025-03-15.signatures.zip
v2.1.0.111-2.1.0.111_canary_2025-03-15 v2.1.0.111_canary_2025-03-15
2025-03-15 12:06:44 +01:00
Kenneth Skovhede 359fd50767 Bump ngclient to 0.0.97 2025-03-15 10:43:07 +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
Kenneth SkovhedeandGitHub c84a9fb86c Merge pull request #6040 from duplicati/feature/safeguard-compile
Safeguards for release compile
2025-03-14 16:45:06 +01: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 SkovhedeandGitHub 0edcf0fcf0 Merge pull request #6039 from duplicati/feature/cleanup-namespaces
Cosmetic cleanup
2025-03-14 15:35:29 +01:00
Kenneth Skovhede 27032048a3 Added Armv7 agent builds 2025-03-14 15:12:03 +01:00
Kenneth Skovhede a15dd4f2e0 Safeguards for release compile
This adds additional checks for the compile phase to avoid missing files in the released builds.

The build is now done into isolated folders, and then copied into the shared target folder to avoid issues with the compiler replacing or removing files.
2025-03-14 15:11:38 +01: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