Commit Graph
168 Commits
Author SHA1 Message Date
Kenneth Skovhede 9f3ea8f805 Fixed isseus with restoring ADS correctly 2026-06-15 14:43:24 +02:00
Kenneth Skovhede a4820ccb62 Implement support for ADS
This PR implements support for reading and writing alternate data streams on Windows.

For now, the option is disabled by default and needs to be enabled with `--enable-ads-backup`. After this option is set, Duplicati will also extract any alternate datastreams from the filesystem and include them in the backup.

By default, ADS elements will be restored, but `--disable-ads-restore` can be used to ignore any ADS elements during the restore process.

This fixes #189
2026-06-08 19:33:01 +02:00
Kenneth Skovhede 179d1ceb47 Make controller Async
This PR has a large blast radius because it takes the final step and bumps up the Controller to be fully async.

We have historically done a piece-by-piece update, so all operations were already async but the controller interface was kept synchronous.

With this update, the controller is now fully async and all tests are updated.

Most places where the new C# compiler warns about function names not ending in `Async` were also adressed, giving a massive refactor change.

Functionally, no changes are done.
2026-05-13 15:04:13 +02:00
Kenneth Skovhede 4244e71fee Improve SQL logging
This PR improves SQL logging by capturing many places where the calls would previously just hit the database and not produce any logging output.
2026-05-06 10:52:58 +02:00
Kenneth Skovhede c0f40e19ca Updated copyright year to 2026 across the project 2026-04-16 15:21:24 +02:00
Kenneth Skovhede d7f9981f49 Fixed a few nullable warnings 2026-02-17 10:37:08 +01:00
Kenneth SkovhedeandGitHub 2632ba8164 Merge pull request #6625 from duplicati/bugfix/restore-deadlock-timer-better-start
Bugfix/Better starting time for restore deadlock detection.
2025-11-15 11:04:25 +01:00
Kenneth Skovhede 43d38efdd3 Fixed remaining warnings 2025-11-14 16:09:05 +01:00
Carl Johnsen d48afd7496 Check the database for volume sizes reported in remotevolume 2025-11-10 14:56:20 +01:00
Kenneth Skovhede 230d80642a Fixed invariant formatting helpers
This fixes an issue with formatting for invariant values that was caused by incrorrect function overload selection.

To avoid future issues, the two similar functions have been renamed to clarify what they are working for.
2025-09-25 11:14:54 +02:00
Carl Johnsen 7670ea9a58 Ensured that all values that are passed to interpolation strings have been passed through FormatInvariant to prevent SQLite errors related to string formatting cultures. 2025-09-05 14:11:05 +02:00
Carl Johnsen b3fe276a13 Ensured that all temporary tables uset the same type of generated guid name 2025-09-05 14:06:55 +02:00
Carl Johnsen 44c8793eaa Changed the cache evict flag in BlockRequest to be an enum, as there are now more than 2 types of block request 2025-08-08 12:38:08 +02:00
Carl Johnsen 79b63ee4b2 Fixed race condition on creating and disposing SqliteCommands from multiple threads sharing the same SqliteConnection 2025-06-24 12:04:31 +02:00
Carl Johnsen 2412800c0c Removed the sqlite page cache option. It should be set through the environment variable, or some other way of providing a custom database configurotion 2025-06-19 11:41:39 +02:00
Carl Johnsen 488d531bd5 Made the LocalRestoreDatabase methods accept a cancellation token 2025-06-19 07:54:53 +02:00
Carl Johnsen bc97eaf71b Removed redundant calls to a SqliteCommand.Parameters.Clear() 2025-06-18 12:06:20 +02:00
Carl Johnsen 9ac583db94 Made all relevant using statements use await to use DisposeAsync 2025-06-18 11:53:11 +02:00
Carl Johnsen f221098c28 Formatted SQL queries - mainly adding double quotes where they were missing. 2025-06-18 10:42:08 +02:00
Carl Johnsen ae633fe0e8 Added more docstrings 2025-06-18 07:42:57 +02:00
Carl Johnsen 86b75b395a LocalRestoreDatabase.IBlockMarker now implements IAsyncDisposable 2025-06-18 06:44:18 +02:00
Carl Johnsen 2296d040a2 LocalRestoreDatabase.IFilesAndMetadata now implements IAsyncDisposable 2025-06-17 22:15:57 +02:00
Carl Johnsen 1f97832546 Classes implementing DisposeAsync should also implement the interface 2025-06-17 15:11:25 +02:00
Carl Johnsen 3d11a05400 Added .ConfigureAwait(false) to all of the await statements 2025-06-12 08:34:29 +02:00
Carl Johnsen bc52522f3b A lot of the SELECT SQL queries don't have to commit. Especially not the ones returning an IAsyncEnumerable as that can leave a query execution as open, while the transaction is committed elsewhere. 2025-06-05 14:44:25 +02:00
Carl Johnsen 507087df1d Calling close on the connection, as that calls the backend directly, and not through the IDb interface 2025-06-05 09:13:40 +02:00
Carl Johnsen 3db2010b1a Ordering of the list of blocks to restore was not ensured to be in the correct order. 2025-06-04 10:32:49 +02:00
Carl Johnsen 6c6378c014 Fixed missing dollar sign 2025-06-04 10:32:19 +02:00
Carl Johnsen bd493638af Merge branch 'master' into performance/mssqlite-async 2025-06-02 10:39:33 +02:00
Kenneth Skovhede f592029c3d Fixed rare deadlock on restore failure 2025-05-28 14:35:00 +02:00
Carl Johnsen ee40767412 Merge branch 'master' into performance/mssqlite-async 2025-05-27 12:04:50 +02:00
Carl Johnsen 0d37608cb7 Each method in the DirectBlockMarker now sets the transaction upon calling to ensure that other outer methods don't commit (and thus invalidate the reference to) the transaction 2025-05-27 09:25:23 +02:00
Carl Johnsen 1861d90450 Made the DirectBlockMarker hold a reference to the database instead of it's inner transaction to more closely resemble the other helper classes 2025-05-27 09:23:34 +02:00
Carl Johnsen 09490b835b Accidentally committed the inner transaction instead of the outer 2025-05-27 09:22:30 +02:00
Carl Johnsen 0ebcad0b85 Removed unnecessary (and incorrect) unpacking of an SQL query 2025-05-27 09:22:08 +02:00
Carl Johnsen da487182ae Connection pool in RestoreDatabase now has a transaction associated with each connection 2025-05-23 15:46:30 +02:00
Kenneth Skovhede 721e497e69 Fixed nullability warnings 2025-05-23 11:46:37 +02:00
Carl Johnsen 9693840611 Updated one call that went from Task<IEnumerable> to IAsyncEnumerable 2025-05-22 06:47:38 +02:00
Carl Johnsen d45e977d53 Found more factory construction inconsistencies 2025-05-21 08:47:24 +02:00
Carl Johnsen 3e3a9b5aa9 More SQL query restructuring 2025-05-20 06:07:45 +02:00
Carl Johnsen bdaa976f6b Changed LocalRestoreDatabase to pass the ReusableTransaction instead of its inner transaction 2025-05-19 10:49:22 +02:00
Carl Johnsen 2dabf56c82 Additional SQL query whitespaces 2025-05-19 10:46:50 +02:00
Carl Johnsen cb4e9eb657 Made the LocalDatabase constructor protected to ensure that derived classes won't call the obsolete warning throwing constructor. 2025-05-19 06:40:18 +02:00
Carl Johnsen 1a0c6dcb37 Restructered SQL statements, ensured all calls to the database are async, and that commands are created using a chan of method calls rather than a sequence of statements 2025-05-16 15:49:40 +02:00
Carl Johnsen 88f5fbb963 Moved async code from constructors to factory functions 2025-05-16 15:48:27 +02:00
Carl Johnsen 43dc194acd Changed heavy properties of LocalRestoreDatabase to methods instead 2025-05-16 15:40:04 +02:00
Carl Johnsen 44c037e864 Implemented factory construction of LocalRestoreDatabase 2025-05-16 13:44:57 +02:00
Carl Johnsen f443331cca Removed import to ensure old way of accessing database isn't hit 2025-05-16 12:21:24 +02:00
Carl Johnsen 19009011b2 Updated LocalRestoreDatabase to async using Microsoft.Data.Sqlite 2025-05-16 12:21:24 +02:00
Kenneth Skovhede a271183b44 Merge branch 'fix-restore-duplicate' of github.com:Jojo-1000/duplicati into Jojo-1000-fix-restore-duplicate 2025-04-30 18:32:43 +02:00