Commit Graph
33 Commits
Author SHA1 Message Date
Kenneth Skovhede 05f2702c82 Added support for renaming files on backends that support it.
This PR updates existing backends to implement the `IRenameEnabledBackend` interface, allowing for more efficient file renaming operations. The implementation varies by backend, with some using native rename operations and others falling back to copy-and-delete patterns.
2026-01-27 13:08:20 +01:00
Kenneth Skovhede 55e52d17fa Added support for setting the lock mode in Azure 2026-01-20 10:51:44 +01:00
Kenneth Skovhede 6cdaa8d936 Added check to ensure lock is applied 2025-12-16 21:53:16 +01:00
Kenneth Skovhede 0f81b42146 Add support for remote locks
This PR adds support for locking files if the backend supports it.

To activate locking, set the option `--file-lock-duration=30D` and the backup will lock the files.

If the database is rebuilt with the intention of continuing the backups, use the option `--repair-refresh-lock-info` which will update lock information in the database after recreating the database.

The locking works by asking the backend to lock files after a backup has completed.

The implementation keeps track of which files are currently assigned a lock and prevents attempting to delete the files that are currently locked.

Note that the bucket should not have a default lock policy as Duplicati needs to finish the backup before the locking is applied.

In this initial version, Azure Blob Storage, B2, S3 and iDrive are supported with locking.

The CLI is updated to allow setting locks on a specific version. The backend tool is updated to allow setting locks on specific files.
2025-12-14 17:17:48 +01:00
Kenneth Skovhede da35b10455 Added override for AzureBlobStorage's internal timeout handling.
This is related to #6629
2025-11-13 11:58:13 +01:00
Kenneth Skovhede fa55a1ed23 Support Azure Access Tier
This adds support for Azure Access Tiers, similar to AWS Storage Class.

This update adds the option to set a custom storage class, as well as the option to define which storage classes are considered archive classes.
2025-04-24 21:14:47 +02:00
Kenneth Skovhede 597c7e1fa3 Implemented nullable for the backends 2025-03-21 08:54:24 +01:00
Kenneth Skovhede 133237e56c Patched up AliyunOSS and AzureBlob with timeouts and new options helpers 2025-03-19 23:18:48 +01:00
Marcelo C. 16aff9dc0b Corrected implementation around exception handling
This implementation ensures the exception for FolderMissingException is treated properly in async enum circumventing the limitation of not having a yield within a try catch block.
2025-03-07 10:32:37 -03:00
Marcelo C. d3bc413b94 Explicit permission + force overwrite 2025-03-05 23:13:02 -03:00
Marcelo C. fe5c536e53 Azure Library Upgrade and Fixes
- Removed obsolete Microsoft.Azure.* references which were deprecated and replaced with Azure.Storage.*
- Cleaned up unused references
- Changes to code due to obsolete classes
- Patched some missing ConfigureAwait(false) on calls that could freeze the UI
- Merged in new async List changes.
2025-03-05 16:38:25 -03:00
Kenneth Skovhede 3337e6a3cc Fixed review comment 2025-02-18 09:18:09 +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 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 Skovhede 586c08522e Implemented async method for Test, CreateFolder and Quota in all backends.
Still missing the List and DNSHostnames.
The AsyncRequest class is also preventing many backends from fully upgrading.
2024-10-01 09:30:02 +02:00
Kenneth Skovhede ecf2e8b551 Implemented DeleteAsync on all backends 2024-09-29 23:04:54 +02:00
Kenneth Skovhede e3e3d1305f Implemented async version of Get for all backends. 2024-09-29 22:00:57 +02:00
Kenneth Skovhede cfbfdad2ab Fixes for Azure Blob 2024-03-01 14:30:28 +01:00
Kenneth Skovhede 40dd3c6816 Updated all license mentions to MIT 2024-02-28 15:45:30 +01:00
Serge 5b3d85fc25 Add authentication using Shared access signature token
Allow users to authenticate using a Shared access signature (SAS) token. SAS tokens are more secure because they:
 * have a start and expiry date/time
 * can be restricted to specified IP addresses
 * can limit access scope to a single Storage blob container
2021-05-15 21:22:50 +10:00
Kenneth Hsu afab61a05b Use pattern matching to simplify casts. 2019-10-19 10:15:38 -07:00
Kenneth Hsu 750b2616f2 Remove unused AddFileObject method. 2019-05-12 10:05:58 -07:00
Kenneth Hsu 402ca280cf Remove unused GetFileObject method. 2019-05-12 10:05:58 -07:00
Sean Templeton 5db326bcdb Update Azure Blob and Backblaze B2 backends for async Put 2019-03-05 21:08:24 -06:00
Kenneth SkovhedeandRune Henriksen 5327d0bebe Fixes for #3596 (#3630)
* backend: azure: add userAgent to requests

* Added dynamic Duplicati version in user-agent header for Azure
2019-01-25 23:20:07 +01: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 71c6aca8a7 Fixed IO calls in Filebackend.
Moved FileEntry to Library.IO due to AlphaFS not implementing
System.IO.FileInfo/DirectoryInfo.
2018-11-01 17:56:48 +01:00
Kenneth Hsu 183ae4ede2 Remove additional unused variables. 2018-09-29 12:49:22 -07:00
Kenneth Skovhede bd863016fa Added support for returning multiple DNS names for cache invalidation.
Updated most backends to return the actual DNS names for cache invalidation.
2018-02-26 11:37:10 +01:00
Kenneth Skovhede 11bf1beac5 Added metadata extraction for the Azure backend 2015-04-09 20:39:56 +02:00
Kenneth Skovhede 8d13e698eb Updated copyright notices 2015-01-20 21:44:52 +01:00
Don Lockhart 2d3425675f Redid the connection string parameters to be more like S3. 2014-08-02 18:36:35 -04:00
Don Lockhart 9e0b89a36f Renamed project folder to AzureBlob. 2014-07-06 10:37:26 -04:00