Commit Graph
77 Commits
Author SHA1 Message Date
Kenneth Skovhede 7031bc57b6 Adding ConfigureAwait(false) to all async enumerations 2025-02-18 09:18:36 +01:00
Kenneth Skovhede bae82feeae Add a check for stale database
This commit adds a check to verify that the remote database is up-to-date before proceeding to repair the remote storage.

Without this check it is possible to start repairs with an old database, and this will cause the remote data to be deleted.

This fixes #4579
2025-02-06 13:20:32 +01:00
Kenneth SkovhedeandGitHub d99f74ed94 Rewrite the backend manager. (#5896)
* Rewrite the backend manager.

This creates a new more logic backend manager that handles all backend operations.

For each top-level operation, there is now a single backend manager instance that is passed to sub-commands.

The internals of the backend manager are now rewritten to use async logic instead of threading.

The design uses a single task runner that dispatches operations and honors concurrent settings and limits from one place.

The logic for each operation has been moved into a separate files/classes to make it easier to understand each operation.

This fixes #5804

* Fixed a few issues with not awaiting tasks

* Fixed not creating empty databases

* Fixed an issue with hashes not being recorded on download

* Reworked the download logic to avoid attempting to decrypt the file if it has been modified.

* Review fixes

* Renamed db collector to better reflect the purpose.

* Review fixes
2025-01-28 08:54:50 +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
Kenneth Skovhede aae4feadb3 Updated logic for handling repair with index files that are missing block files. 2024-10-29 21:30:06 +01:00
Kenneth SkovhedeandGitHub bfc3d61bc2 Merge branch 'master' into fix-leftover-index 2024-07-19 13:53:06 +02:00
Kenneth Skovhede c890e824ee Implemented test for reproducing issue #5196
Fixed issue by changing order options are written and verified.
Some whitespace changes due to renaming a method
2024-05-21 15:48:29 +02:00
Jojo-1000 0b92f19572 Merge branch 'master' into fix-leftover-index 2024-05-11 23:37:21 +02:00
Kenneth Skovhede 473c6cbbb8 Merge commit '4f577c65a4d8806f79637c50c21ca3a683c5a07a' into feature/kestrel-avalonia-upgrade 2024-03-04 12:21:53 +01:00
Kenneth Skovhede 40dd3c6816 Updated all license mentions to MIT 2024-02-28 15:45:30 +01:00
Jojo-1000 2a2dd92ba4 Fix index block link for extra index files in repair.
The link was created before the volume was added to the database, resulting in ID -1.
2023-10-08 22:34:15 +02:00
Thomas Suckow ecb0249259 dotnet no longer provides a method for a string to hashalgorithm
* Also fix up not diposing of hashers
2021-04-04 11:17:13 -07:00
Max c882953fdd upstream 2020-05-31 13:50:13 +02:00
Kenneth Hsu d50f86ab7d Fix issue with repairing missing dindex files.
Since we are keeping around a reference to the IndexVolumeWriter and
BlockVolumeWriter instances, we cannot wrap their usages in using
statements.

This fixes issue #4046.
2020-01-09 19:55:27 -08:00
Max 41a5591532 upstream 2019-12-25 16:34:56 +01:00
Kenneth Hsu 0cfce6be39 Include fileset file when repairing missing dlist file.
This concerns issue #3982.
2019-11-20 22:19:03 -08:00
Kenneth Hsu 54992d5beb Ensure that BlockVolumeWriter is disposed. 2019-09-28 10:31:37 -07:00
Kenneth Hsu bc975dd090 Ensure that IndexVolumeWriter is disposed. 2019-09-28 10:30:13 -07:00
Michal Naiman 1bc1e58737 upstream 2019-04-28 13:45:26 +02:00
Kenneth Hsu b824c86c7e Avoid unnecessary enumeration of collections.
This improves performance by using Any() to avoid unnecessary
enumeration of collections.
2018-10-06 16:20:18 -07:00
Max a22a7a7d24 remove of FasterHashing component 2018-09-09 14:42:40 +02:00
Kenneth Skovhede 6255a9e0db Disabled automatic recreate of dblock files, as it rarely works.
Added an option to re-activate dblock recreation.
This partially addresses #2335
2018-08-07 11:14:28 +02:00
Kenneth Hsu f12858e6a5 Mark fields that shouldn't be reassigned as readonly.
This makes it explicit at compile-time that these fields should not be
reassigned outside the constructor.
2018-05-25 10:04:52 -07: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 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 683b04741d Merge branch 'master' into concurrent_processing
# Conflicts:
#	Duplicati/Library/Main/Operation/BackupHandler.cs

Manually fixed the HashAlgorithmHelper case
2017-09-20 13:56:37 +02:00
Kenneth Skovhede 6d401fbd8d Changed all hash algorithms to use the Cng version.
This fixes #2621
2017-09-20 09:58:43 +02:00
Kenneth Skovhede 66cf98a8b3 Merge branch 'master' into concurrent_processing
# Conflicts:
#	Duplicati/Library/Main/Duplicati.Library.Main.csproj
2017-06-20 15:17:02 +02:00
Kenneth Skovhede a0d9ad5d4e Changed --backup-prefix hint texts to --prefix.
This fixes #2548
2017-06-19 22:06:35 +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 a029890409 Implemented better default error messsages 2017-01-09 11:35:38 +01:00
Kenneth Skovhede ab6379cec2 Added helpful hints if it is detected that the errors can be fixed with purge-broken-files 2017-01-05 20:58:33 +01:00
Kenneth Skovhede 9a227ada6b Reworked the cleanup process to allow a dangling filelist, such that this dangling entry can be used as the basis for a synthetic filelist.
Also added an option to disable synthetic filelists.
This fixes #2038.
This fixes #2101
2016-12-24 11:42:26 +01:00
Kenneth Skovhede 32423d78b5 Added EndTime value in a few places.
This fixes #2127
2016-12-02 00:08:09 +01:00
Kenneth Skovhede 94c5e10480 Merge branch 'master' into concurrent_processing
# Conflicts:
#	Duplicati/Library/Main/Database/LocalBackupDatabase.cs
#	Duplicati/Library/Main/Database/LocalDatabase.cs
#	Duplicati/Library/Main/Database/RemoteVolumeEntry.cs
#	Duplicati/Library/Main/Operation/BackupHandler.cs
#	Duplicati/Library/Main/Operation/RecreateDatabaseHandler.cs
#	Duplicati/Library/Main/Operation/RepairHandler.cs
#	Duplicati/Library/Main/Operation/RestoreControlFilesHandler.cs
2016-09-16 10:33:07 +02:00
Kenneth Skovhede db8c025497 Merge branch 'master' into concurrent_processing
# Conflicts:
#	Duplicati/Library/Main/Operation/RecreateDatabaseHandler.cs
2016-09-15 11:44:39 +02:00
Kenneth Skovhede 0c68daff6c Fixed all whitespace to be 4 spaces instead of tabs 2016-09-15 11:39:27 +02:00
Kenneth Skovhede 490776ed73 Implemented a database flag to mark a database as partially recreated.
Fixed issue with error messages when attempting to recreate a partial database for restore as described in #1695.
2016-09-13 21:55:15 +02:00
Kenneth Skovhede 08d8bd67a6 Fixed error after merge with latests master 2016-03-30 08:33:10 +02:00
Kenneth Skovhede 317fd493d8 Merge branch 'master' into concurrent_processing
# Conflicts:
#	Duplicati/Library/Main/Database/LocalDatabase.cs
#	Duplicati/Library/Main/Operation/BackupHandler.cs
#	Duplicati/Library/Main/Operation/RecreateDatabaseHandler.cs
2016-03-30 08:30:09 +02:00
Kenneth Skovhede 6b18217c0a Merge branch 'feature/improved_rebuild_queries'
# Conflicts:
#	Duplicati/Library/Main/Operation/RecreateDatabaseHandler.cs
#	Duplicati/Library/Main/Operation/RepairHandler.cs
2016-03-18 14:32:43 +01:00
Kenneth Skovhede 0530cb4d52 Added repair-in-progress check to avoid continuing work on a broken database 2016-03-18 13:26:12 +01:00
Kenneth Skovhede 0ebbef0b97 Implemented feature that does not delete extra index files if their content fits the database. 2016-03-17 21:51:42 +01:00
Kenneth Skovhede be959a8a1b Changed the name of a resource class 2016-03-14 09:35:01 +01:00
Kenneth Skovhede 537fe20838 Added a lot of comments.
Fixed a few issues that caused parallel uploads.
Fixed the use of the encryption module so the encryption module is not re-used for multiple jobs.
2016-02-25 19:15:51 +01:00
Kenneth Skovhede e2c3ba91e6 Added consistency check when re-building index files. 2016-02-23 20:56:58 +01:00
Kenneth Skovhede 02a1d7131e Implemented a sanity check to see if the repair process makes damages. 2015-11-28 21:53:46 +01:00
Kenneth Skovhede ab9da38ef1 Fixed an issue with restores that do not touch all remote volumes.
This fixes #1429.
2015-08-24 10:50:47 +01:00
Kenneth Skovhede 1be8d16e22 Added option to allow repairing only a specific fileset for faster restore from scratch 2015-04-08 20:34:31 +02:00