Commit Graph
44 Commits
Author SHA1 Message Date
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 46428936c4 Various updates after the upgrade 2025-11-14 15:45:19 +01:00
Kenneth Skovhede 721e497e69 Fixed nullability warnings 2025-05-23 11:46:37 +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
Kenneth Skovhede 9dfe977d3f Changed logic so the source providers are now logically mounted into the source directory structure.
This fixes the restore issues as all sources will now appear as if they were originally part of the source file system.

The backend implementation has now been simplified so the backends only return names of entries with no path information.  Most backends already do this, but the S3 backends did not, so this was fixed as well.

This also clears up the interfaces, so the backend does not know about the `ISourceProviderEntry`. All mapping is done by the `BackendSourceProvider`, making it simpler to support other backends as sources.
2025-02-21 16:06:55 +01:00
Kenneth Skovhede cf5b4bb24d Added support for Wmic based Windows VSS snapshots.
Refactored code a bit to be easier to understand.
2025-02-19 14:00:14 +01:00
Kenneth Skovhede 73d0ad905f Fixed USN support 2025-02-18 22:12:37 +01:00
Kenneth Skovhede bb5fd80a29 Implemented support for some backends as sources: SSH, CIFS, and S3 2025-02-17 14:01:08 +01:00
Kenneth Skovhede 8c935a7344 This creates a new ISourceProvider interface for describing a data source.
With this interface it is possible to wrap the current support for snapshots and USN and simplify the enumeration.

This makes a number of assumptions into fields such as `IsMetaEntry` and `IsRootEntry` that removes code that was checking for various properties.

This first commit has support for VSS and USN as well as "naked" files, keeping feature parity.

There is also an experimental support for loading a backend-as-a-source. The support for this is currently limited as the backends need to be extended to support a folder concept.
2025-02-09 16:14:22 +01:00
Kenneth SkovhedeandGitHub 6bbd64a655 Fixed nullability warnings in Utility.cs (#5861)
* Fixed nullability warnings in `Utility.cs`

* Fixed a number of nullability issues and warnings

* More nullable fixes

* Fixed the overwrite issue

* Fixed additional nullability issues

* Removed additional nullability issues

* More nullability fixes and added some xmldoc

* Added more xmldocs and removed an unused argument

* Removed more warnings
2025-01-14 14:03:48 +01:00
Kenneth SkovhedeandGitHub 9464caf622 Feature/update license 2025 (#5851)
* Fixed some minor whitespace issues

* Updated all copyright to 2025
2025-01-07 09:40:39 +01:00
Kenneth SkovhedeandGitHub ff1b2b7990 Simplified task control (#5753)
* Simplified task control by having all logic in a single class and using async control mechanism
* Fixed the tests
* Made the marking of a backup partial explicitly communicated if the enumeration process is stopped.
* Added support for pausing active transfers
* Introduced transfer token to abort operations.
* Updated the way LiveControl is emitting events.
* Retains the paused state of the server across reboots, this fixes #5760.
* Reworked the way throttle speeds are propagated through LiveControls.
* Added option to pause transfers in the UI.
* Removed throttle settings from the LiveControls class so it is exclusively handled by the ApplicationSettings.
* Removed `thread-priority` as it does not work at all when tasks are used.
* Fixed the stop dialog and API to only support stop and abort.
* Removed unused variables
2024-12-18 08:27:59 +01:00
Carl Johnsen b2288cb804 Removed named CoCoL channels in favor of passing around instances. 2024-12-09 13:55:22 +01:00
Kenneth Skovhede 300752652f Added detection of the SQLite journal file for the active database.
This fixes #5603
2024-10-28 09:00:40 +01:00
Kenneth Skovhede 8743543707 Maded the log-ids distinct to simplify error tracking 2024-07-30 09:06:54 +02:00
Jojo-1000 796be8ce29 Merge branch 'master' into improve-source-file-picker 2024-05-11 23:53:57 +02:00
Kenneth Skovhede 40dd3c6816 Updated all license mentions to MIT 2024-02-28 15:45:30 +01:00
Jojo-1000 74db90924e Fix processing files repeatedly if present in multiple sources.
This can happen if a source is added to force including a system folder.
2024-01-16 18:52:30 +01:00
BlueBlock 4407d24f5d codacy fixes applied 2019-08-02 13:48:50 -04:00
BlueBlock 14e6068a5f Also stop the file enum process when the user has cancelled
The file enumeration process should also stop when the user has cancelled the operation.
2019-07-24 15:58:44 -04:00
BlueBlock 29a1a7c618 fix stop after the current file
'stop after upload' is now
stop after the current file' and the operation will cleanly allow the current file to complete.
2019-07-23 10:35:33 -04:00
verhoek b2cc18426c Renamed Library.IO to Library.Common.IO.
Moved basic Platform functions to Library.Common.Platform.
Turned IO_OS into property within Library.Common.
2018-11-02 21:34:07 +01:00
verhoek 40dc6da81d Created separate package for io wrapper. 2018-10-25 20:01:55 +02:00
Kenneth Hsu d72128ec83 Remove unused method parameters. 2018-10-06 15:09:43 -07:00
Kenneth Hsu 590fc151cd Rename parameter so that it does not duplicate method name. 2018-07-04 15:43:37 -07:00
Kenneth Hsu 1a2ee3a5ef Simplify return type of synchronous methods.
Since these methods no longer have the async modifier, they do not need
to return a Task, and do not need to be awaited.
2018-07-04 15:35:14 -07:00
Kenneth Hsu 6c38651f19 Rename methods to clarify their synchronous behavior.
Since these methods no longer have the async modifier, we should not
include 'Async' in their names.
2018-07-04 15:35:14 -07:00
Kenneth Hsu 5e3f15ada4 Remove async modifier from methods that lack await.
A method marked async that does not use await will run synchronously.
By removing the async modifiers, we make it more explicit that these are
synchronous methods.  This also addresses some compiler warnings, and
avoids the creation of the state machine used to handle asynchronous
operations.
2018-07-04 15:35:09 -07:00
verhoek 30cd41585b Corrected spelling function name. 2018-05-16 20:08:40 +02:00
Kenneth Skovhede 2b54bb9415 Removed the redundant byte-array-to-string method from the MD5 module, and added a using directive.
Added some additional logging to better diagnose issues with VSS/LVM snapshots.
2018-05-09 10:44:32 +02:00
Daniel Gehriger ad8a3f4d4e Simplified USN journal interface; corrected folder enumeration broken due to latest merge with master 2018-04-26 23:03:50 +02:00
Daniel Gehriger 0b43c467c7 Merge remote-tracking branch 'upstream/master' into feature/usn 2018-04-25 17:19:13 +02:00
Kenneth Skovhede 83950e78c6 Merge branch 'feature/ignore_filenames_option' into feature/exclude_empty_folders
# Conflicts:
#	Duplicati/Library/Main/Operation/Backup/CountFilesHandler.cs
#	Duplicati/Library/Main/Operation/Backup/FileEnumerationProcess.cs
#	Duplicati/Library/Main/Operation/BackupHandler.cs
#	Duplicati/Library/Main/Operation/TestFilterHandler.cs
#	Duplicati/Library/Main/Options.cs
#	Duplicati/Library/Main/Strings.cs
2018-04-24 14:46:46 +02:00
Kenneth Skovhede c6be934747 Implemented empty folder exclusion flag 2018-04-24 13:11:03 +02:00
Kenneth Skovhede e51e1b9e5a Implemented option to use exclude filenames to mark folders for exclusion by placing a specially named file inside 2018-04-24 11:25:37 +02:00
Daniel Gehriger 1af7f9e0ca Merge remote-tracking branch 'upstream/master' into feature/usn 2018-04-23 22:28:27 +02:00
Kenneth Skovhede da7f705def Merge branch 'master' into concurrent_processing
# Conflicts:
#	Duplicati/Library/Main/Operation/BackupHandler.cs
2018-04-12 22:02:31 +02:00
Kenneth Skovhede 79f7b22e0f Merge branch 'master' into concurrent_processing
Changed a few things on the way, removing the log process

# Conflicts:
#	Duplicati/Library/Main/Controller.cs
#	Duplicati/Library/Main/Database/ExtensionMethods.cs
#	Duplicati/Library/Main/Database/LocalBackupDatabase.cs
#	Duplicati/Library/Main/Duplicati.Library.Main.csproj
#	Duplicati/Library/Main/Operation/BackupHandler.cs
#	Duplicati/Library/Main/Operation/FilelistProcessor.cs
#	Duplicati/Library/Main/Operation/PurgeBrokenFilesHandler.cs
#	Duplicati/Library/Main/Operation/TestFilterHandler.cs
#	Duplicati/Library/Main/Options.cs
#	Duplicati/Library/Main/ResultClasses.cs
#	Duplicati/UnitTest/BasicSetupHelper.cs
2018-04-11 23:02:47 +02:00
Kenneth Skovhede d18431b385 Merge branch 'master' into concurrent_processing
# Conflicts:
#	Duplicati/Library/Main/Controller.cs
#	Duplicati/Library/Main/Database/ExtensionMethods.cs
#	Duplicati/Library/Main/Database/LocalBackupDatabase.cs
#	Duplicati/Library/Main/Duplicati.Library.Main.csproj
#	Duplicati/Library/Main/Operation/BackupHandler.cs
#	Duplicati/Library/Main/Operation/RecreateDatabaseHandler.cs
#	Duplicati/Library/Main/ResultClasses.cs

First attempt at merging all changes from 2016-10-08 to now :/
2017-05-30 00:35:31 +02:00
Kenneth Skovhede 2653224da2 Merge branch 'master' into concurrent_processing
# Conflicts:
#	Duplicati/Library/Main/Operation/BackupHandler.cs
2016-08-31 14:17:35 +02:00
Kenneth Skovhede a3f2b39d23 Implemented handling of pause/stop/abort in the concurrent code.
Implemented the dry-run feature for backups.
2016-02-29 21:52:11 +01:00
Kenneth Skovhede 20f7b42945 Fixed channels to use type-safe initializations.
Updated logging channel to use a wrapper for later early-filter optimizations.
Various bug fixes and optimizations.
2016-02-24 23:48:42 +01:00
Kenneth Skovhede 01c3b3f5c0 More work on a concurrent implementation of the backup process 2016-02-09 09:17:31 +01:00
Kenneth Skovhede 0a26e263f1 Work on concurrent processing 2016-01-28 22:24:51 +01:00