Commit Graph
1357 Commits
Author SHA1 Message Date
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
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
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 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 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 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 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
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 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
Kenneth SkovhedeandGitHub 1616341df7 Merge branch 'master' into feature/fix-dry-run-2 2026-01-28 15:20:35 +01:00
Kenneth SkovhedeandGitHub 1a19b6aa9b Merge pull request #6728 from duplicati/feature/issue-6538
Fixed issue with missing log
2026-01-28 15:20:04 +01:00
Kenneth SkovhedeandGitHub 6299837860 Merge branch 'master' into feature/fix-dry-run-2 2026-01-28 14:43:33 +01:00
Kenneth Skovhede c765a5658b Improved query for purge broken files
This PR improves the query used to calculate the size of removed files when issuing the purge-broken-files command.

This PR also adds the option `--reduced-purge-statistics` which will fully skip the size calculation, in the event the query is still performing poorly.

This fixes #6366
2026-01-27 21:15:50 +01:00
Kenneth Skovhede bb2be7966e Fixed issue with missing log
When an error occurred, the log would be written to the database, but the transaction would then be rolled back, causing the log to disappear.

This adds explicit commit to the log when handling error cases.

This fixes #6538
2026-01-27 21:08:36 +01:00
Kenneth Skovhede d4eace8544 Made the restore more robust in the event of failures with individual files/directories. 2026-01-27 17:06:52 +01:00
Kenneth Skovhede 655d6cbe65 Prevent restore target escape
This PR adds checks on limited restores, where the user has asked for files to be restored within a specific folder.

This PR adds explicit checks to ensure that the restore data cannot accidentially or maliciously constructed in such a way that it will affect files outside of the restore target folder.
2026-01-27 15:51:30 +01:00
Kenneth Skovhede a986a13abf Fixed dry-run command
This PR adds fixes to honor the --dry-run option to avoid surprises when running an operation.

This fixes #6573
This closes #6581
2026-01-27 15:01:34 +01:00
Kenneth Skovhede c0dd3ccea2 Fixed another failing test 2026-01-26 14:58:58 +01:00
Kenneth Skovhede 27dc64121b Implemented cross-tenant email restore 2026-01-16 11:09:13 +01:00
Kenneth Skovhede ca7dff57f3 Updated restore flow to use the IRestoreDestinationProvider interface for accessing files 2026-01-14 10:11:24 +01:00