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.
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.
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.
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.
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.
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.
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.
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).
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.
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.
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.