Kenneth Skovhede
47afbbbdad
Fixed a transitional issue
2025-03-19 21:42:08 +01:00
Kenneth Skovhede
bb1aa8e1f7
Cosmetic cleanup
...
Removed superfluous namespaces.
Using `var` most places.
Using extension methods for common setup of commands.
2025-03-14 14:34:56 +01:00
Kenneth Skovhede
7234d43961
Fixed all SQL strings to use interpolation and forced them into the FormattableString handler using the invariant formatting.
2025-03-14 12:13:17 +01:00
Kenneth Skovhede
f342d70819
Implemented forced invariant locale on all SQL strings.
...
This fixes #6023
2025-03-13 23:06:32 +01:00
Carl Johnsen
6e08affd1a
Rather than having the tempfile database create new ID's for each entry, reuse the File.ID so the connections that do not have access to the temp table can access the same data.
2025-02-28 10:27:02 +01:00
Carl Johnsen
a0eae4131b
Cleaned up LocalRestoreDatabase
2025-02-27 14:14:07 +01:00
Carl Johnsen
692954ee97
Made the local restore database use a connection pool for getting block data
2025-02-26 16:08:55 +01:00
Carl Johnsen
a49c66bcb5
Added caching of localrestoredatabase data
2025-02-25 17:42:30 +01:00
Carl Johnsen
6d7faf97bb
Whitespace
2025-02-25 17:41:57 +01:00
Kenneth Skovhede and GitHub
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 Skovhede and GitHub
9464caf622
Feature/update license 2025 ( #5851 )
...
* Fixed some minor whitespace issues
* Updated all copyright to 2025
2025-01-07 09:40:39 +01:00
Carl Johnsen
198e4d8e6e
Refactor SQL query formatting
2025-01-03 11:06:49 +01:00
Carl Johnsen
661a73ff2a
Merge remote-tracking branch 'upstream/master' into SlowBigRestore
2025-01-03 10:11:50 +01:00
Carl Johnsen
6ba956dfcd
Moved all database operations to the LocalRestoreDatabase.
...
Also changed the old changes, so that the functions related to the legacy restore remains untouched.
2024-12-03 08:35:14 +01:00
Carl Johnsen
f85ffabe3e
Linux SQLite doesn't want values in quotes
2024-12-02 10:45:52 +01:00
Carl Johnsen
079598c2e8
Added database function for getting files alongside symlinks to restore
2024-11-29 03:41:41 +01:00
Carl Johnsen
7aa9db533e
Added preliminary metadata restoration
2024-11-26 20:01:19 +01:00
Carl Johnsen
ebac24ce04
Rather than specifying multiple guids for a restore, use the one that the restore database has.
2024-11-25 08:52:51 +01:00
Carl Johnsen
0cd9374bed
Added comments and docstrings
2024-11-22 15:26:04 +01:00
Carl Johnsen
43a392f139
The tempfiletable name is also required externally from the database.
2024-11-22 11:26:25 +01:00
Carl Johnsen
50c6fb434c
Got the list of block IDs per file
2024-11-08 05:56:48 +01:00
Jojo-1000
917e2cd0c4
Remove obsolete custom platform detection.
2024-05-30 02:14:05 +02:00
Kenneth Skovhede
49fb45859c
Fixed some incorrectly quoted literals in SQL statements
2024-04-15 08:24:01 +02:00
Kenneth Skovhede
40dd3c6816
Updated all license mentions to MIT
2024-02-28 15:45:30 +01:00
snamds
468d672d87
Improve performance of big restore datasets
2022-01-31 14:26:21 +01:00
snamds
f9ea467939
Improve performance of big restore datasets
2022-01-31 14:22:50 +01:00
Kenneth Hsu
bacc50513e
Provide explicit column names when creating temp table.
...
If we do not use an AS clause, the name of the column in the result set
is unspecified and may change depending on the version of SQLite.
https://www.sqlite.org/c3ref/column_name.html
This fixes #4403 .
2020-12-29 19:58:06 -08:00
Kenneth Hsu
20e599586a
Fix typo in variable name.
2020-11-15 12:23:46 -08:00
Honoré Vasconcelos
71494826f9
Improve query performence used in GetFilesAndSourceBlocksFast
...
Tree changes in query
* Move inner selection S to a temporary table
* Reorder join field in outer query
* Remove intersection with File view in outer selection
File view is already intersected with in selection S
With the above-mentioned changes, on a specific testset, query took 9s instead of 6min.
2020-08-26 10:10:54 +01:00
Kenneth Hsu
13e1f0dac6
Remove unused Database members.
2020-03-14 16:45:08 -07:00
Kenneth Hsu
83ac03843d
Fix spelling errors in comments.
...
In doing so, we also normalized some line endings.
2019-12-14 09:52:55 -08:00
Kenneth Skovhede and GitHub
99d0cb3c57
Merge pull request #3953 from warwickmm/make_fields_readonly
...
Mark fields that don't need to be reassigned as readonly
2019-10-21 08:36:17 +02:00
Kenneth Hsu
2aa76881a5
Mark fields that don't need to be reassigned as readonly.
...
This makes it explicit at compile-time that these fields should not be
reassigned outside the constructor.
2019-10-19 13:59:22 -07:00
Kenneth Hsu
afab61a05b
Use pattern matching to simplify casts.
2019-10-19 10:15:38 -07:00
Kenneth Hsu
40cae529e6
Move NormalizeDateTime method to Utility class.
2019-09-01 12:38:23 -07:00
Rune Henriksen and GitHub
f5f353fe19
Merge branch 'master' into feature/fix_path_storage2
2019-01-25 23:37:57 +01:00
verhoek
ab12be6bbd
Renamed IsClientLinux to IsClientPosix .
2018-11-03 09:26:04 +01:00
verhoek
8bb406cd15
Migrated to use the platform class.
2018-11-02 22:17:16 +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
bc053df294
Moved basic IO helper functions to Library.IO.
2018-10-27 12:17:07 +02:00
Kenneth Skovhede
03722fcba1
Merge branch 'master' into feature/fix_path_storage2
...
# Conflicts:
# Duplicati/Library/Main/Database/LocalRecreateDatabase.cs
2018-10-23 11:33:35 +02:00
Kenneth Hsu
beb552fa9e
Remove unnecessary use of partial keyword.
...
These classes are defined in a single location.
2018-10-13 16:53:28 -07:00
Kenneth Hsu
9ce1e807c7
Remove unused variables and fields.
2018-09-29 10:41:27 -07:00
Kenneth Skovhede
cbc18970d5
Re-applied the path-storage fix as the merge failed somehow
2018-06-14 10:12:24 +02:00
Kenneth Hsu
20f2f37806
Remove unnecessary calls to String.Format.
2018-06-02 12:02:55 -07: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
ee64517f7d
Removed calls to Console.WriteLine as we may run somewhere without a console.
2018-05-15 11:29:08 +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 Hsu
5fb1958ceb
Remove redundant calls to ToString.
2017-11-26 15:44:34 -08:00
Dan Stahr
af14151d91
Fixed an error in renaming absolute Windows paths.
...
Previously, the output of the first replace was never used and therefore the absolute Windows paths were not restored
correctly.
The two patterns (i.e. ?: and \\) are disjoint so rewriting the previous result in case a match is found
for the second one is OK.
2017-03-10 22:01:24 +00:00