Commit Graph
3196 Commits
Author SHA1 Message Date
aureliandevel ee3dbcd97a Merge branch 'feature/restore-volume-caching-revision' of https://github.com/aureliandevel/duplicati into feature/restore-volume-caching-revision 2026-04-04 16:43:34 +11:00
aureliandevel d760e1381a Add restore volume cache profiling summaries 2026-04-04 16:10:05 +11:00
aureliandevelandGitHub 9ea67febda Update RestoreVolumeCacheMinFreeLong description
Add default value to RestoreVolumeCacheMinFreeLong description
2026-03-02 00:02:51 +11:00
aureliandevel e7b998f909 Enhance restore volume caching: implement disk pressure eviction logic and add related options 2026-02-28 20:14:22 +11:00
Kenneth SkovhedeandGitHub 414789f209 Merge branch 'master' into feature/full-disk-backup 2026-02-20 10:46:40 +01:00
Carl Johnsen 4d1e388e33 Less intrusive legacy restore changes
Due to the legacy restore flow being volume-centric, restoring has to become two phases: 1 for the priority files, and 2 for the "rest" of the files.
2026-02-19 17:52:53 +01:00
Carl Johnsen 1cadb775b8 Restored BackupHandler to its original 2026-02-19 15:54:09 +01:00
Kenneth Skovhede ab29642e10 fix(backup): wait for index file uploads to complete before starting backup
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.
2026-02-19 13:26:04 +01:00
Kenneth SkovhedeandGitHub e14ccd5cb7 Update BackupHandler.cs
Minor fixes
2026-02-18 11:54:42 +01:00
Kenneth Skovhede d7f9981f49 Fixed a few nullable warnings 2026-02-17 10:37:08 +01:00
Carl Johnsen 9c91820832 Mount point should only have the directory seperator appended if it's set 2026-02-15 17:37:46 +01:00
Carl Johnsen 594efeca04 Merge branch 'master' into feature/full-disk-backup 2026-02-15 16:42:08 +01:00
Kenneth Skovhede cf02c1addf Fixed large SQLite inputs
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.
2026-02-11 13:34:58 +01:00
Carl Johnsen ced4ed8ea4 Legacy restore now also restores priority files first 2026-02-09 12:41:55 +01:00
Carl Johnsen e9012ada05 Added synchronization of priority files prior to restoring regular files 2026-02-09 12:28:21 +01:00
Carl Johnsen 3fe57b308d Added functionality for priority files for restore providers 2026-02-09 11:36:15 +01:00
Kenneth SkovhedeandGitHub 6e675f9aaf Merge pull request #6750 from duplicati/feature/guard-against-duplicati-source-paths
Handle duplicate source paths
2026-02-06 16:35:07 +01:00
Kenneth SkovhedeandGitHub 18c12b66c3 Merge pull request #6753 from duplicati/feature/check-temp-space
Check free temporary space
2026-02-06 15:56:29 +01:00
Kenneth SkovhedeandGitHub baca571ef8 Merge pull request #6727 from duplicati/feature/prevent-restore-target-escape
Prevent restore target escape
2026-02-06 14:33:01 +01:00
Carl Johnsen 0bba2fb986 Mountpoint is not supported for disk image backup 2026-02-06 12:16:23 +01:00
Kenneth Skovhede 05ea1dfafe Check free temporary space
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.
2026-02-06 10:37:27 +01:00
Kenneth Skovhede a31d6d4655 Fixed checks handling path traversal with mixed directory separator characters 2026-02-05 17:15:06 +01:00
Kenneth Skovhede cf8ef437c9 Fixed an edge case where the code would attempt to create a parent folder outside the restore target prior to applying metadata 2026-02-05 15:17:14 +01:00
Kenneth Skovhede e7aa60fba0 Handle duplicate source paths
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.
2026-02-05 11:06:41 +01:00
Kenneth Skovhede 56f74803fc Fixed edge cases for path traversal protection 2026-02-05 09:21:24 +01:00
Kenneth Skovhede 44bef1e855 Implement support for filesystem snapshots on macOS using APFS (Apple File System). This allows disks-consistent backups and backing up files that are locked by other processes by creating and mounting local snapshots using tmutil.
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
2026-02-04 15:02:31 +01:00
Kenneth SkovhedeandGitHub 1b1719e924 Merge pull request #6718 from duplicati/feature/add-office-365-backup
Add office 365 backup and restore
2026-02-01 13:12:44 +01:00
Kenneth SkovhedeandGitHub 3db18c923c Merge pull request #6739 from duplicati/feature/fix-issue-6425
Fixed purge size calculation.
2026-01-30 19:15:24 +01:00
Kenneth SkovhedeandGitHub 89cdb85a11 Merge pull request #6740 from duplicati/feature/fix-issue-6553
Add guard against invalid entries
2026-01-30 19:04:54 +01:00
Kenneth Skovhede ebbc564424 Added fix for manual changelist
This PR updates the logic for using `--changed-files` so the combined fileset no longer has additional (left-over) entries.

This fixes #6529
2026-01-30 17:33:32 +01:00
Kenneth Skovhede fa0c9c72a9 Add guard against invalid entries
This PR guards agains inserting entries into the DeletedVolume if they reference non-existing volumes, which can happen in error scenarios.

This fixes #6553
2026-01-30 16:49:03 +01:00
Kenneth SkovhedeandGitHub 4b2402d381 Merge pull request #6733 from duplicati/feature/fix-issue-6539
Fix issue with failed delete
2026-01-30 16:19:59 +01:00
Kenneth Skovhede 4a598019a8 Fixed purge size calculation.
This fixes the size calculation on purge to only include blocks once, and not include blocks that are still referenced elsewhere.
2026-01-30 16:08:39 +01:00
Kenneth Skovhede cee97bb01a Treat inconsistency state the same for both deleted and deleting, so a failed delete does not cause a database inconsistency 2026-01-30 15:09:17 +01:00
Kenneth SkovhedeandGitHub e61fadf40f Merge pull request #6732 from duplicati/feature/improve-support-for-remote-source
Extended support for remote sources
2026-01-30 08:27:24 +01:00
Kenneth Skovhede 7cebb96e95 Fixed an issue with mount points not always being recorded as folders 2026-01-29 21:19:15 +01:00
Kenneth Skovhede 2bb31d8273 Update to use destination restore path to avoid leaking credentials in the log 2026-01-29 20:22:09 +01:00
Kenneth SkovhedeandGitHub 4745aa464b Merge branch 'master' into feature/add-office-365-backup 2026-01-29 20:11:29 +01:00
Kenneth SkovhedeandGitHub 046c175362 Merge pull request #6735 from duplicati/feature/fix-issue-6552
Handle missing blocks on recreate
2026-01-29 20:08:20 +01:00
Kenneth SkovhedeandGitHub 4d36711769 Merge pull request #6726 from duplicati/feature/fix-dry-run-2
Fixed dry-run command
2026-01-29 20:06:17 +01:00
Kenneth SkovhedeandGitHub 26f7dd8586 Merge branch 'master' into feature/add-office-365-backup 2026-01-29 20:04:42 +01:00
Kenneth SkovhedeandGitHub 47829034c1 Update ResultClasses.cs
Removed #nullable as the file is not properly nullable annotated
2026-01-29 16:08:44 +01:00
WhiteElephantIsNotARobotandClaude a1a22efafa Add RestorePath property to restore results
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>
2026-01-29 14:32:01 +00:00
Kenneth SkovhedeandGitHub 29adda9552 Merge pull request #6734 from duplicati/feature/improve-commandline-execute
Minor fixes for better experience when running a command and the data…
2026-01-28 21:05:50 +01:00
Kenneth Skovhede fa6be206ef Handle missing blocks on recreate
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
2026-01-28 21:03:03 +01:00
Kenneth Skovhede 015176a2f8 Fix not crashing when requesting lock-info on a destination that does not support it. 2026-01-28 18:07:18 +01:00
Carl-Johannes JohnsenandGitHub 6b02116bed Merge pull request #6708 from carljohnsen/feature/automatic-321
Feature/Automatic 3-2-1 backup
2026-01-28 17:21:33 +01:00
Kenneth SkovhedeandGitHub 3e0aedd8b6 Merge branch 'master' into feature/fix-issue-6539 2026-01-28 15:44:28 +01:00
Kenneth Skovhede 0f61698238 Minor fixes for better experience when running a command and the database is in an incorrect version 2026-01-28 15:37:41 +01:00
Kenneth SkovhedeandGitHub 1616341df7 Merge branch 'master' into feature/fix-dry-run-2 2026-01-28 15:20:35 +01:00