Add a synchronization point after recreating missing index files to
ensure all uploads are settled and committed to the database before
the backup process continues. This prevents a race condition where
the backup could start while index files are still being uploaded.
In this case, it would be possible for the backup to reference the file that is currently being deleted. This would be very rare in production as the delays have to align and the new data must be changed and processed very quickly to trigger the issue.
In unittests we have observed the issue for a while but only showing up very rarely.
When performing queries with large inputs, there is a possibility that we reach the maximum number of possible parameters. If the query exceeds the maximum number of parameters the query fails.
This change uses a temporary table that will be created in the case the inputs exceed the total number available parameters, making sure the calls proceed as before with small inputs, but uses temporary tables on larger inputs.
Some tests were added to ensure the update works as expected, even with large inputs.
This PR adds checks for free temporary space when starting the server and when restoring.
On systems that have limited space in the temp folder a warning will now be shown.
This is intended to capture issues on some Docker systems where /tmp is mounted in memory instead of being disk backed.
It will also detect the issue on other systems that are space constrained.
This PR adds guards to prevent creating filesets with multiple files that have the same path.
While it should technically be impossible to have multiple entries that have the same path, it could happend either due to glitches or because the source data (manual lists, remote sources, etc) returns duplicates.
This PR adds a simple check for each folder to ensure that on a folder-level, duplicate paths cannot be introduced.
There is also a post-backup check to evict any duplicates, and the recreate process will reject duplicate paths.
Finally, the repair command will remove duplicates if they somehow manage to get into the database anyway.
A database-level prevention is not currently feasible as it needs a cross-table check for uniqueness, which requires more work from the database to check for each added file. Since this is expected to be a very rare event, the added processing was not justified.
Key changes:
- Add `MacOSSnapshot` class implementing `SnapshotBase`
- Add helper scripts for creating, finding, and removing APFS snapshots
- Update `SnapshotUtility` to initialize macOS snapshots
- Enable `snapshot-policy` option for macOS in `Options.cs`
- Update build configuration to include APFS scripts
- Update snapshot test utility with macOS support
This fixes#6409
This PR guards agains inserting entries into the DeletedVolume if they reference non-existing volumes, which can happen in error scenarios.
This fixes#6553
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 handles a case where the `dindex` files may reference non-existing `dblock` files. In this case the recreate may register missing (and unused) blocks in the `DeletedBlock` table, which will later cause issues if the blocks are attempted used.
The fix is to remove missing blocks before the cleanup so there is no entry that references the missing volumes.
This fixes issue #6552