Commit Graph
3206 Commits
Author SHA1 Message Date
Carl Johnsen 5046edef49 Re-write the results after running the modules to elevate any errors or warnings emitted by a module to be part of the main results through logging. 2026-03-20 04:39:26 +01:00
Carl Johnsen 21d52ea793 Changed from a reflection based approach to a type safe one.
This is done by making the operation update class public so they can be accessed outside of the main library, and the progress updater is passed down from the controller.
2026-03-20 04:38:16 +01:00
Carl Johnsen 29a8a0ad5f Added a remote synchronization phase 2026-03-18 15:44:40 +01:00
Carl Johnsen 1201a8344d Removed whitespace 2026-03-18 15:36:10 +01:00
Kenneth Skovhede 6a82da0e81 Fix null versions array 2026-03-14 19:17:51 +01:00
Kenneth Skovhede ec6e32be39 Fixed usage of filelist filter 2026-03-14 18:26:37 +01:00
Kenneth Skovhede a01a7ff5f7 Fixed filtering to return a null delegate when not filtering 2026-03-14 13:56:26 +01:00
Kenneth Skovhede 84cc4005b1 Fix restore without local db
This fixes a bug where restoring with `--no-local-db` and `--version=0` would fail because the database consistency check sees that data is missing.

The missing data is intentional in this case, as we deliberately recreate a partial database.

The PR adds a test for this scenario and fixes the validation to allow for the partial database. Additionally, the partial database is marked as such, in case it is not correctly deleted after the restore.
2026-03-14 12:02:53 +01:00
Carl Johnsen c679e77f95 Merge branch 'master' into feature/full-disk-mac 2026-03-05 19:21:57 +01:00
Carl Johnsen afbecbc7f0 Do not catch abort exceptions 2026-03-05 12:20:54 +01:00
Kenneth Skovhede 9bd4d228f3 Minor polish to the new restore flow
This PR adds explicit validation to the size parameters so we ensure that we throw a meaningful error message instead of fail on some later step.

This also fixes an error in an exception message. Should the error scenario ever trigger, it would previously show incorrect data or cause out-of-bounds error instead of the intended error message.
2026-03-04 14:44:09 +01:00
Carl Johnsen 1ad2344e99 ParallelScanner may be null 2026-02-27 15:36:03 +01:00
Carl Johnsen 8d55fd84fe Removed whitespace 2026-02-27 13:51:17 +01:00
Carl Johnsen 0268da5ef6 Fixed race condition where the source provider would be disposed before the parallel scanner was done accessing it. 2026-02-27 13:51:05 +01: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