This PR changes to use relative database paths by default. The default mode is to store all databases in the same folder.
With this update, the paths stored in the server database can now be relative, in which case they are resolved relative to the datafolder.
This makes it simpler to move the data folder as the paths are not stored in full.
For new backups, relative paths are assigned.
For existing backups, the full paths are retained.
If the database path is updated manually, the path will be made relative, if it is relative to the datafolder; otherwise a full path is stored.
This fixes#6677
This PR has a large blast radius because it takes the final step and bumps up the Controller to be fully async.
We have historically done a piece-by-piece update, so all operations were already async but the controller interface was kept synchronous.
With this update, the controller is now fully async and all tests are updated.
Most places where the new C# compiler warns about function names not ending in `Async` were also adressed, giving a massive refactor change.
Functionally, no changes are done.
Adds two new commands to the database CLI tool:
- verify: Lists all databases with their status (Found, Missing, Orphaned)
across dbconfig.json, server database, and filesystem
- cleanup: Removes orphaned database files not referenced in dbconfig.json
or server database, with --dry-run and --force options
Includes unit tests for both commands.
This adds a connection string repo, where connection strings can be stored.
The general idea is that it is possible to store connection strings, say an S3 connection, and then re-use the connection string for multiple backups, editing as needed.
The implementation supports listing connection strings, creating, updating, and deleting them.
The connection strings are masked so sensitive information is not available in the browser, and the logic patches connection strings internally to ensure markers are replaced with the correct values.
The connection string itself is stored in full, such that a Duplicati version roll-back will not make the connectionstring become invalid.
There is also an endpoint that allows updating existing backups using the connection string, so it is easy to rotate keys. The logic for this feature is that it retains: scheme, port, host, path, and any extra settings on the target url.
It does not remove settings from the target, but will overwrite or add settings from the connectionstring.