This adds the output folder path to the restore log/results, addressing
issue #6698. When performing a restore, especially long-running ones,
users may forget where files were restored to. This change ensures the
restore path is included in the JSON output.
Changes:
- Added RestorePath property to IRestoreResults interface
- Added RestorePath property to RestoreResults class
- Set RestorePath in RestoreHandler at the start of the restore operation
When no custom restore path is specified (files restored to original
locations), RestorePath will be null. Otherwise, it contains the
absolute path where files were restored.
Co-Authored-By: Claude (mimo-v2-flash) <noreply@anthropic.com>
This PR adds support for locking files if the backend supports it.
To activate locking, set the option `--file-lock-duration=30D` and the backup will lock the files.
If the database is rebuilt with the intention of continuing the backups, use the option `--repair-refresh-lock-info` which will update lock information in the database after recreating the database.
The locking works by asking the backend to lock files after a backup has completed.
The implementation keeps track of which files are currently assigned a lock and prevents attempting to delete the files that are currently locked.
Note that the bucket should not have a default lock policy as Duplicati needs to finish the backup before the locking is applied.
In this initial version, Azure Blob Storage, B2, S3 and iDrive are supported with locking.
The CLI is updated to allow setting locks on a specific version. The backend tool is updated to allow setting locks on specific files.
This repair will leave the database in a still-broken state, but if this is run prior to purge-broken-files, less data will be lost.
Also updated the purge-broken-files operation to keep files and directories in the set, if they are only missing metadata.
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.
Direct import of PR#4978
Update web UI for new result reports.
For operations with fatal errors, write logs to same operation ID.
Test that Interrupted flag is correct in RunScriptTests.
Update backup log display for new result reporting.
Hide file statistics for fatal errors and change fatal icon.
- add backup state to DB table 'fileset' (job database upgrade to version 10)
- modify the Restore page dropdown to display if a backup is "partial"
- modify retention logic to remove partial backups only when the next recent full-backup has been removed
The one class that implements these interfaces, BasicResults, requires
both read and write access to these properties. As such, we might as
well declare the getter and setter in the interface.
Added a delete page with options to delete the local database, as well as the remote files.
Added a captcha to protect against automated attacks that would attempt to delete the remote files.
This fixes#1201