Commit Graph
116 Commits
Author SHA1 Message Date
BlueBlock c8bb889f6d Merge remote-tracking branch 'upstream/master' into fix-stop-after-current-file 2019-09-07 11:27:20 -04:00
Kenneth Hsu 0a390bd31a Move NormalizeDateTimeToEpochSeconds method to Utility class. 2019-09-01 12:38:23 -07:00
BlueBlock c8df8c5354 move method to base 2019-09-01 13:12:03 -04:00
BlueBlock d82d146322 fix case of parameter 2019-08-30 11:16:12 -04:00
BlueBlock 08e2c18185 add handling of a partial backup
- add backup state to DB table 'fileset' (job database upgrade to version 10)
- modify the Restore page dropdown to display if a backup is "partial"
- modify retention logic to remove partial backups only when the next recent full-backup has been removed
2019-08-05 20:14:05 -04:00
Rune HenriksenandGitHub f5f353fe19 Merge branch 'master' into feature/fix_path_storage2 2019-01-25 23:37:57 +01:00
Rune Henriksen f696842877 remove unsed method and call 2019-01-05 00:30:43 +01: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 f4f676a1de Remove unnecessary variable assignment.
These variables are assigned values that are never read by any
subsequent instruction.
2018-09-28 20:13:45 -07:00
Kenneth Skovhede fd87bf6de5 Fixed a missing GetMetadataHashAndSizeForFile method and added transactions to GetFileHash 2018-09-07 14:46:32 +02:00
Kenneth Skovhede a8cb4af389 Merge branch 'master' into feature/fix_path_storage2
# Conflicts:
#	Duplicati/Library/Main/Database/LocalBackupDatabase.cs
#	Duplicati/Library/Main/Operation/Backup/BackupDatabase.cs
#	Duplicati/Library/Main/Operation/Backup/MetadataPreProcess.cs
2018-09-07 09:44:23 +02:00
Kenneth Skovhede 809ba9a856 Changed the default query to be v==2, as multiple users reported this to be fastest.
The previous default query is now v==4.

Added an additional v==3, and a `LIMIT 1` clause to v==4 as suggested here:
https://forum.duplicati.com/t/release-2-0-3-10-canary-2018-08-30/4497/25
2018-09-05 10:12:28 +02:00
Kenneth Skovhede d0026d8028 Reworked the file-path query, and enabled experimentally changing it by setting the environment variable TEST_QUERY_VERSION=1 or TEST_QUERY_VERSION=2.
Added check to the unittests to catch cases where it scans too many files.
2018-08-13 13:23:59 +02:00
Kenneth Skovhede 4d1bea86a6 Attempt at making a leaner version of getting the previous file's information 2018-08-11 14:39:03 +02:00
Kenneth Skovhede 5507496352 Fixed the query to correctly extract metadata for a file, using the Metadataset indirection 2018-08-11 14:37:23 +02:00
Kenneth Skovhede 52cb9fb1f9 Removed the deprecated --store-metadata option.
Rewrote the logic for pre-filtering files based on timestamps/metadata to be more verbose and well documented.
Fixed an issue where `--check-filetime-only` also checked the file size, which was not present due to the reduced query used to grab only the lastmodified information.
Fixed a problem where the check for existing metadata was wrong and produced a warning.

This fixes #3204
This handles some of #3194
2018-08-11 11:48:19 +02:00
Kenneth Skovhede 61060e05b8 Merge branch 'master' into feature/fix_path_storage2
# Conflicts:
#	Duplicati/Library/Main/Database/LocalBackupDatabase.cs
2018-08-07 22:44:41 +02:00
Kenneth Skovhede e9d7c47602 Disabled logging block and file database access to reduce overhead in these queries.
Added an option to explicitly re-enable logging of the database queries (`--profile-all-database-queries`)
2018-08-07 09:40:43 +02:00
Kenneth Skovhede cbc18970d5 Re-applied the path-storage fix as the merge failed somehow 2018-06-14 10:12:24 +02:00
Kenneth Skovhede d042e70ca2 Changed the returned IEnumerable values to be fully created, which avoids issues with locks and transactions being prematurely released.
This might help with #3202
2018-06-04 11:56:54 +02:00
Kenneth Hsu 20f2f37806 Remove unnecessary calls to String.Format. 2018-06-02 12:02:55 -07:00
Daniel Gehriger 8236cae390 USN change journal based backup now correctly reporting source size 2018-05-02 11:24:24 +02:00
Daniel Gehriger 7bf0a25912 Revert "Merge remote-tracking branch 'upstream/feature/fix_path_storage' into feature/usn"
This reverts commit 10d6b4c31c, reversing
changes made to 1af7f9e0ca.
2018-04-23 23:02:52 +02:00
Daniel Gehriger 10d6b4c31c Merge remote-tracking branch 'upstream/feature/fix_path_storage' into feature/usn 2018-04-23 22:57:32 +02:00
Kenneth Skovhede a8a32ea115 Added refactoring to improve the storage requirements for the local database, and speed up various queries.
This fixes #1283
2018-04-23 22:31:47 +02:00
Daniel Gehriger 1af7f9e0ca Merge remote-tracking branch 'upstream/master' into feature/usn 2018-04-23 22:28:27 +02:00
Daniel Gehriger 2c1a0ddb4e Implemented backup based on changes recorded in NTFS USN journal 2018-04-19 22:59:28 +02: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 9093603be1 Added support for disabling the file scanner during backups.
This fixes #2963
2018-02-11 20:57:38 +01:00
Kenneth Skovhede 75bf6857c1 Merge branch 'master' into concurrent_processing
# Conflicts:
#	.travis.yml
#	Duplicati/Library/Main/Database/LocalBackupDatabase.cs
#	Duplicati/Library/Main/Operation/BackupHandler.cs
#	Duplicati/Library/Main/ResultClasses.cs
#	Duplicati/Library/Main/Volumes/VolumeWriterBase.cs
#	Duplicati/Library/Utility/TempFile.cs
2018-01-20 15:02:41 +01:00
Kenneth Hsu ab489d9a28 Make parameter names in XML documentation match code. 2017-12-09 18:42:30 -08:00
Kenneth Hsu 1c7391399d Remove XML documentation for unmatched parameters. 2017-12-09 18:30:01 -08:00
Kenneth Skovhede d57c789f4f Merge branch 'master' into concurrent_processing
# Conflicts:
#	Duplicati/Library/Main/Duplicati.Library.Main.csproj
#	Duplicati/Library/Main/Options.cs
2017-09-18 11:56:35 +02:00
Kenneth Skovhede 7d3ac25426 Re-introduced the in-memory block-cache. This time keeping it simple with a check for size-induced collisions. 2017-09-16 18:44:25 +02:00
Dan Stahr 3b422ff058 Fixed some of the failing tests in concurrent_processing branch 2017-08-06 11:32:11 +01:00
Kenneth Skovhede 76139f207e Merge branch 'master' into concurrent_processing 2017-05-30 14:00:24 +02:00
Kenneth Skovhede 4d77fd7ebc Flipped the check for existing metadata 2017-05-30 10:29:18 +02:00
Kenneth SkovhedeandGitHub a8fe193f1e Merge pull request #2507 from downpoured/master
Proposed fix, --deleted-files causes Fatal error / System.FormatException
2017-05-30 00:53:18 +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
Ben Fisher 76f3769f70 Proposed fix, --deleted-files causes Fatal error / System.FormatException
A simple backup that specifies --deleted-files causes a Fatal error.
Shortened repro steps:
(See Github comment for full repro steps)
>duplicati.commandline.exe backup file://C:\data\local\testchangedfiles\destination "C:\data\local\testchangedfiles\source\\" --encryption-module="none" --no-encryption="true" --dbpath="testchangedfiles.sqlite"  --compression-module="zip" --keep-versions=-1  --no-auto-compact="true"
>del source\file6.txt
>duplicati.commandline.exe backup file://C:\data\local\testchangedfiles\destination "C:\data\local\testchangedfiles\source\\" --changed-files="C:\data\local\testchangedfiles\source\file1.txt;C:\data\local\testchangedfiles\source\file2.txt" --deleted-files="C:\data\local\testchangedfiles\source\file6.txt" --encryption-module="none" --no-encryption="true"  --dbpath="testchangedfiles.sqlite"  --compression-module="zip" --keep-versions=-1  --no-auto-compact="true"

Results in:
Fatal error => Input string was not in a correct format.
System.FormatException: Input string was not in a correct format.
   at System.Number.StringToNumber
   at System.Number.ParseInt64
   at System.String.System.IConvertible.ToInt64
   at System.Convert.ToInt64
   at System.Data.SQLite.SQLiteStatement.BindParameter
   at System.Data.SQLite.SQLiteStatement.BindParameters
   at System.Data.SQLite.SQLiteCommand.BuildNextCommand
   at System.Data.SQLite.SQLiteCommand.GetStatement
   at System.Data.SQLite.SQLiteDataReader.NextResult
   at System.Data.SQLite.SQLiteDataReader..ctor
   at System.Data.SQLite.SQLiteCommand.ExecuteReader
   at System.Data.SQLite.SQLiteCommand.ExecuteNonQuery
   at System.Data.SQLite.SQLiteCommand.ExecuteNonQuery
   at Duplicati.Library.Main.Database.LocalBackupDatabase.AppendFilesFromPreviousSet
   at Duplicati.Library.Main.Database.LocalBackupDatabase.AppendFilesFromPreviousSet
   at Duplicati.Library.Main.Operation.BackupHandler.RunMainOperation
   at Duplicati.Library.Main.Operation.BackupHandler.Run
   at Duplicati.Library.Main.Controller.RunAction[T]
   at Duplicati.Library.Main.Controller.Backup
   at Duplicati.CommandLine.Commands.Backup
   at Duplicati.CommandLine.Program.RunCommandLine
>Exit code: 100

With this patch, backup completes successfully.
2017-05-28 16:01:18 -07:00
Kenneth Skovhede 6cadaad56a Rewrote the query to use CROSS JOIN to force the SQLite query planner to consider the File table first. 2017-05-19 08:07:39 +02:00
Kenneth Skovhede d9014ee09c Changed query as suggested by @sjonez in issue #2442.
This fixes #2442.
2017-05-18 23:40:24 +02:00
Dan Stahr 27c9e15875 Improved database performance and logging
- Don't use Vacuum() just before PurgeLogData (which performs vacuum() already)
 - Removed unncessary poorly performning query (after optimizing it I found out it's unused)
 - Correctly log calls for ExecuteScalarInt64
2017-03-23 15:22:58 +00:00
Kenneth Skovhede f5a1bcd32c Reverted the SQL query to use the Timestamp sorting instead of explicit fileset.
This fixes #2244
2017-01-11 23:48:41 +01:00
Kenneth Skovhede 9a849a2b58 Improved support for cross-os restores.
This fixes #1302
This fixes #1983
2017-01-06 23:01:54 +01:00
Kenneth Skovhede 179290d521 Added more extensive listing to further pinpoint the source of the error in #1400 2017-01-05 22:15:59 +01:00
Kenneth Skovhede 76aae5de7b Changed the logic for getting the last-modified timestamp from the database.
Now we only look at the timestamp from the previous fileset, instead of for the last time the file was seen.
This should improve lookup times, and thus the running time for backups with many files.

This change means that the following sequence of operations will react differently:

- backup
- delete file
- backup
- undelete file
- backup

Prior to this commit, the undeleted file would be seen with the original timestamp and thus can avoid being scanned for changes.
After this commit, the file will be treated as a new file, even if it has the previous timestamp and will thus be scanned for changes.

An additional switch has been introduced, --check-filetime-only that improves the lookup further by not looking at the metadata or filesize, and thus makes a much lighter call to the database, where fewer tables need to be touched.
2017-01-05 10:03:32 +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 3182a227b9 Added additional debug info for tracing the cause of issue #1400 2016-12-23 17:04:12 +01:00