Commit Graph
62 Commits
Author SHA1 Message Date
Kenneth Skovhede 4d569c51e4 Added read-only testing to backends
This PR adds a flag to the test method so we can choose to test for read-only access (needed for restore) or read-write (needed for backups).

Additionally, this PR fixes a logic bug in that the BackendSourceProvider would not actually test the connection, but just check the placeholder element returned (which is always returned). With this PR the backend's ListAsync command is tested fully.

Also renamed the methods on ISourceProvider to have the `...Async` prefix.

This replaces #6939
2026-06-03 17:27:34 +02:00
Kenneth Skovhede c0f40e19ca Updated copyright year to 2026 across the project 2026-04-16 15:21:24 +02:00
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 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
Kenneth Skovhede 2822e95626 Simplify webmodule lookups
This PR adds the lookup data to the module output, such that the FE does not need to call a webmodule to get the dictionaries with lookup values.
2025-09-05 10:49:20 +02:00
Kenneth Skovhede d94ca804ea Fixed CodeQL compile issue + a warning 2025-08-07 11:24:10 +02:00
Kenneth Skovhede 3a294d95fb Fixed compile warnings 2025-08-07 08:06:24 +02:00
Marcelo C. 614f047dbb Sets infinite timeout for HTTP clients
Ensures that long-running HTTP requests, such as downloads and uploads, do not timeout prematurely.

This change configures specific HttpClient instances with an infinite timeout to accommodate operations that may take an extended period. The default 100s timeout is retained for some operations like registration, where a long delay may indicate a problem.
2025-06-12 10:33:13 -03:00
Kenneth Skovhede bc48135782 Fixed code to be compatible with System.Text.Json instead of NewtonSoft.Json 2025-05-24 15:50:37 +02:00
Kenneth Skovhede 06c5b14eda Minor cleanup to use the HttpClient API 2025-05-24 10:51:00 +02:00
Marcelo C. 262aca847d Exception Handling migrated from WebException 2025-05-23 12:09:11 -03:00
Marcelo C. 132508545c Openstack HttpClient migration 2025-05-23 10:37:42 -03:00
Kenneth Skovhede 6031b4de8b Update Test method to check for write permissions
This PR moves the check from the FTP backend into shared code, so all backends will now check for read/write permissions when using the "Test" button.

For situations where write permissions are not required (like restore or verify) there is a flag on the v2 API that indicates if the connection was established, so the UI can show a message suggesting that it is possible to proceed, if the current UI operation does not require write permissions.

This fixes #2473
2025-05-21 17:19:27 +02:00
Kenneth Skovhede 631c80d6a8 Cleaned up some option names 2025-03-24 10:17:26 +01:00
Kenneth Skovhede 53972a4c78 Updated OpenStack 2025-03-21 16:35:29 +01:00
Kenneth SkovhedeandGitHub 4822bc4550 Merge pull request #5978 from duplicati/feature/make-backends-async
Final conversion to async backends
2025-02-26 18:02:05 +01:00
Olivier Chaze 395a5cb64f Adding two Infomaiak Cloud locations 2025-02-26 14:47:20 +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 SkovhedeandGitHub d0924c3e01 Auto-select version for OpenStack (#5836)
This adds a check to see if the give url contains the standard `/v3` suffix, and if so selects the v3 protocol.
2025-01-03 17:20:19 +01:00
Kenneth Skovhede 61ea36091a Added DNSNames as async 2024-10-02 09:37:52 +02: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 40dd3c6816 Updated all license mentions to MIT 2024-02-28 15:45:30 +01:00
Andrew RuthvenandAndrew Ruthven dc609e297d Add Catalyst Cloud as an OpenStack target
I successfully have backups running to Catalyst Cloud and I'm able to restore.
2023-05-12 16:02:00 +12:00
linitio 7560a65f04 Add all Infomaniak clusters Swiss Backup & Public Cloud 2022-06-14 16:20:29 +02:00
linitio 8ade3abe8c Add all Infomaniak clusters Swiss Backup & Public Cloud 2022-06-14 16:17:16 +02:00
Kenneth Skovhede 63e7c4e693 Minor naming fix 2022-06-12 20:25:22 +02:00
Mickael Asseline 81d6d1e40a Add Infomaniak SwissBackup to backend 2022-01-31 15:17:52 +01:00
Kenneth Hsu de2a651763 Fix bug in PutAsync implementations.
Without await, the using statement can dispose the Stream before the
call to PutAsync completes, resulting in an ObjectDisposedException.

This fixes #4556.
2021-06-12 15:12:13 -07:00
Kenneth Hsu d040120422 Fix documentation for OpenStack command line arguments. 2020-06-14 12:21:48 -07:00
Kenneth Hsu 4acbdb700b Update OVH backend URL to Keystone API v3.
OVH is updating the Keystone API from v2 to v3:

https://ovh.slgnt.eu/optiext/optiextension.dll?ID=dStdoW+qPGF+x+s02CEdQ_I66qw4G_Z_rqsNrzqCkOZiWQwdnmWGsZerWXZIQoWQpcyyq3Su3addd_

This fixes #4087.
2020-02-05 20:41:31 -08:00
Kenneth Hsu afab61a05b Use pattern matching to simplify casts. 2019-10-19 10:15:38 -07:00
Sean Templeton b02b19e683 Change Put method name to PutAsync 2019-03-17 18:28:45 -05:00
Sean Templeton c3472823de Update HubiC and OpenStack backends for async Put 2019-03-05 21:08:26 -06:00
Sean Templeton 0c122ff550 Change IBackend and IStreamingBackend to return Task for Put() 2019-03-03 21:43:10 -06: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 bc053df294 Moved basic IO helper functions to Library.IO. 2018-10-27 12:17:07 +02:00
Kenneth Hsu 0c1ac9c489 Replace chained LINQ calls with call to overload with predicate.
This simplifies the code by reducing the number of enumerators created
while also making the code slightly more readable.
2018-10-06 16:20:18 -07:00
Kenneth Hsu d4d1945faf Use utility method to append trailing slash.
This removes some duplicated code.
2018-09-22 10:19:45 -07:00
Tom Whitwell 54ae844536 Add Memset's Cloud Storage to Openstack providers 2018-05-17 12:03:30 +01:00
Enrico Polesel 904616aff5 Solved some codacy warnings on Duplicati/Library/Backend/OpenStack/OpenStackStorage.cs 2018-04-11 11:44:05 +02:00
Enrico Polesel e257cf569a Improved code quality for the PR 2018-04-06 10:13:15 +02:00
Enrico Polesel 6a8776f7f5 Openstack keystone v3 support
Added support for the new keystone v3 API, the old v2.0 APIs are still
available, the v3 can be selected with a version option.

Only password login is implemented here for API v3, so token login is
still missing.
2018-04-05 15:14:22 +02:00
Kenneth Skovhede 842fd96543 Implemented a new logging system that is more transparent and allows a more granular way of picking log messages.
Added ID's to each log message and each exception to allow later introduction of a Knowledgebase service that explains each error in more detail.
2018-03-15 09:12:34 +01: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
Rune Henriksen fc77b476fc changed from NYI to null returns. Added check to skip DNS check if no DNSName is provided 2018-02-21 22:38:01 +01:00
Rune Henriksen 00292953c3 added DNSName getter on Backend interface and added NotImplementedException methods on each backend class 2018-02-18 00:18:44 +01:00
Kenneth Hsu 8810e0130d Make string comparisons use ordinal (binary) sort rules.
These string comparisons should not be culture-aware.
2017-11-26 11:19:54 -08:00