Commit Graph
191 Commits
Author SHA1 Message Date
Kenneth Skovhede 08907045b0 Added script to generate dlist files 2026-02-23 17:50:40 +01:00
Carl Johnsen 3626d3e4ed Moved core functionality of the remote synchronization tool from the tool to a shared library, making the tool a thin wrapper. 2026-01-08 14:36:36 +01:00
Carl Johnsen 8519e3f591 Promoted LightWeightBackendManager to the main Duplicati library 2026-01-08 14:26:26 +01:00
Carl Johnsen ec71bdaecd Merge branch 'master' into feature/duplicati-storage-backend 2025-11-20 11:01:41 +01:00
Carl Johnsen 696bf1282e Made LightweightBackendManager.TryCreateFolder public 2025-11-20 09:28:52 +01:00
Carl Johnsen 82382814eb Made the LightweightBackendManager resettable 2025-11-20 09:27:15 +01:00
Kenneth Skovhede 3b695cf065 Added support for Photos on MacOS
This PR adds detection of the MacOS Photos folder, and intercepts reads and replaces them with PhotoKit calls.
With this, it is possible to make backups of all MacOS Photos, even if they are not stored locally.

The previous versions would just make a backup of the on-disk structure, which was not guaranteed to contain all photos, but instead has various indexing for finding photos, and may contain some original photos.

The option `--photos-handling` controls how Duplicati now deals with the Photos folder. The options are:
- `LibraryOnly`: Same as before, just treat it as a folder
- `PhotosOnly`: Ignore the folder contents and just back up the actual photos
- `PhotosAndLibrary` (default): Make a backup of the photos and the library on-disk. This may cause images to be stored twice, but de-duplication will usually limit the storage increase.

The option `--photos-library-path` can be used to point to the on-disk Photo library that should be handled, in case the auto-detection does not pick it up. If this does not point to a valid Photoslibrary, or the path is not being backed up, no special handling will be done.

Note that the restore is not restoring into Photos itself, but instead restores into a sub-folder in the Photolibrary that is called `dup_backup`. To get the photos out after a restore, one needs to right-click the Photolibrary folder, and choose "Show package contents" and then the `dup_backup` folder is revealed.

This is done to keep all photos in the same folder, but avoid messing with the structure of the on-disk Photolibrary.

A future update could allow restoring back into Photos, and metadata is captured for each image to eventually allow this.

This fixes #6381
2025-11-17 17:12:10 +01:00
Kenneth Skovhede 1ea74a3c63 Updated to .NET10 2025-11-14 15:05:39 +01:00
Carl Johnsen 521102dfeb Rename should reset the stream position before handing it off to the put operation 2025-11-06 15:01:37 +01:00
Carl Johnsen cca0dbf8f8 If the stream does not support streaming, it shouldn't be reset on failure (e.g. due to folder missing) 2025-11-05 08:48:19 +01:00
Kenneth Skovhede 012aeed7de Add dynamic streaming toggle
This PR adds a dynamic property so a backend can signal if it supports streaming, based on the settings.

This is currently used for the File backend, so that toggling `--use-move-for-put` will disable streaming on the backend instead of relying on the `--disable-streaming-transfers` flag.
2025-11-03 12:48:37 +01:00
Carl Johnsen bdb1ec0ed8 Made the backoff wait timer reset on every operation. 2025-08-07 21:06:48 +02:00
Carl Johnsen 8e30612071 Changed LightWeightBackendManager.ListAsync to return a List rather than an IAsyncEnumerable to allow it to retry the operation on failure. 2025-08-07 21:05:35 +02:00
Carl Johnsen a4183f189b Made AutoCreateFolder also use the retry logic. 2025-08-07 21:03:05 +02:00
Carl Johnsen 69ff37a684 Moved the retry counting to the Retry method, so that it's counted per operation, rather per overall runtime 2025-08-07 21:02:39 +02:00
Carl Johnsen 50509d3bcd Added printing of the parsed configuration of the remote synchrotization tool 2025-08-06 07:32:00 +02:00
Carl Johnsen 0bfef25ac8 Removed commandline argument shorthand 2025-08-06 07:31:36 +02:00
Carl Johnsen dcc59f190b Added ConfigureAwait(false) to all async calls 2025-08-06 07:30:35 +02:00
Carl Johnsen 3d02c7ee4a Properly added cancellation token to the remote synchronization tool 2025-08-06 07:27:02 +02:00
Carl Johnsen de952cae9c In the case of a backend not supporting streaming operations, the backend should be disposed. 2025-08-06 06:14:38 +02:00
Carl Johnsen f30e3db25b Updated and added docstrings for the remote synchronization tool 2025-08-05 20:09:09 +02:00
Carl Johnsen 5b8f11148d Added additional options for the new lightweight backend manager. 2025-08-05 20:00:13 +02:00
Carl Johnsen fafd3d1907 Handled nullable warnings, as the fields in question are guarenteed to not be null at those points 2025-08-05 19:38:38 +02:00
Carl Johnsen b5b33fb019 Added proper resetting of streams during errors within the remote synchronization tool 2025-08-05 15:07:52 +02:00
Carl Johnsen 542186228d Added error handling to the lightweight backend manager; copied from BackendManager.Handler 2025-08-05 13:05:10 +02:00
Carl Johnsen 167bd46a8a Added a lightweight backend manager to the remote synchronization tool 2025-08-05 11:07:19 +02:00
Carl Johnsen a5d730e06b Changed from explicit type to var 2025-07-08 15:27:36 +02:00
Carl Johnsen fbbea78aeb Moved options parsing to its own method, which now includes double checking by trying to reconstruct the parsed option. 2025-07-08 08:29:09 +02:00
Carl Johnsen d98e1096e3 Fixed case where the arguments passed to the remote synchronization tool might emit everything past the second equals sign 2025-07-08 07:50:39 +02:00
Kenneth Skovhede 3741d46e3d Corrected hash calculation 2025-05-20 22:22:01 +02:00
Kenneth Skovhede 78aa14554b Reduce synctool memory usage
This PR updates the file copy to use a temporary stream, instead of a memorystream to preserve memory.

It also fixes two places where rewinds were needed, and replaces the compare of streams with a hash compare.
2025-05-20 19:45:21 +02:00
Kenneth Skovhede ef631a1199 Added feature to suppress warnings
This PR adds the option to suppress warnings by their log id. Warning IDs that are supplied to `--suppress-warnings` will be converted to information messages before being logged.

If a specific warning is disabled, such as `CompressionReadErrorFallback`, this will then no longer count as a warning for the job, and the log file will see the warning as an information message.

This PR also adds two simpler filter options that makes it possible to filter log messages by supplying the log IDs. This can already be achieved with log filters, but the ID filter is a bit simpler to apply, as you only need to know the ID.

Finally, this PR also adds common logging for errors in the categories:
- Permission denied, id = `PermissionDenied`
- File locked, id = `FileLocked`
- Path not found, id = `PathNotFound`
- Path too long, id = `PathTooLong`

These new log ids makes it simpler to ignore warnings about locked or inaccesible files.
2025-05-20 14:26:10 +02:00
Carl Johnsen 8be97bcefd Whitespace changes 2025-05-16 10:22:51 +02:00
Carl Johnsen 58db4c9753 Restructured ItemGroups 2025-05-16 10:15:31 +02:00
Carl Johnsen 04153d2c12 Removed Microsoft.DotNet.Analyzers.Compatibility from csproj's as it's deprecated. 2025-05-16 09:53:26 +02:00
Kenneth Skovhede a0ecc5e05d Added a database downgrade tool 2025-04-24 16:36:14 +02:00
Carl Johnsen 750ef90e14 Clarified file overwrite conditions in the help text of the Remote Synchronization tool. 2025-03-10 13:26:15 +01:00
Kenneth Skovhede f77e529eb6 Merge commit '2339aeff28adba15442d0be60c56568ae642ad0b' into feature/make-backends-async 2025-02-26 15:23:48 +01:00
Carl Johnsen ef6d708d3a Added degree of parallelism as a commandline option to the test data generator 2025-02-20 09:23:47 +01:00
Carl Johnsen eacd46dcd8 Added parallel execution to the test data generator 2025-02-20 09:00:07 +01:00
Carl Johnsen 057c698fa3 Throughput times used were incorrect 2025-02-18 10:28:59 +01:00
Carl Johnsen f3c8412f30 Added throughput and ETA reporting 2025-02-18 10:20:44 +01:00
Carl Johnsen 7ca9a18648 Cannot assign a value to a variable in a foreach loop 2025-02-18 09:59:25 +01:00
Carl Johnsen 211dbcd8e2 Fixed a bug where the file creation throws a permission exception, because a folder with the same name exists. 2025-02-18 09:54:38 +01:00
Carl Johnsen 1c8396efd7 Add random seed option to test data generation command 2025-02-18 09:41:04 +01:00
Carl Johnsen ea95cdb5f4 Merge branch 'master' into feature/add-test-data-generator 2025-02-18 09:35:25 +01:00
Kenneth Skovhede 0f9669b273 Final conversion to async backends
This PR is the final change, where all backends are now purely implemented with async interfaces.

The code changes here replace the LIST call with an async version. This affect all backends (and then some) but the changes are mostly mechanical rewrites of the code.

In many places, the backeds were already prepared for async output, in other some glue was needed.

To reduce the scope of this change, some backends simply report a synchronous result as an async list.
2025-02-17 16:45:51 +01:00
Kenneth Skovhede 0260a061bb Made the synctool an executable 2025-02-10 21:37:52 +01:00
Carl Johnsen 728a75a902 One stopwatch wasn't ensured always stopped in a try block 2025-02-07 10:30:39 +01:00
Carl Johnsen 4144b3a25e Changed to the log timer instead of stopwatch where applicable 2025-02-07 10:29:33 +01:00