Commit Graph
530 Commits
Author SHA1 Message Date
Kenneth Skovhede cdd3c7b63c Merge branch 'master' into concurrent_processing 2018-04-12 15:10:03 +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
Tyler Gill a3a98c644a Merge branch 'master' of https://github.com/duplicati/duplicati into feature/filter-groups 2018-04-10 10:48:46 -06:00
Kenneth Hsu cb0a3ed2a1 Make constructors for abstract classes protected.
While this does not affect any behavior, it more accurately describes
the accessibility.  Since abstract classes can only be instantiated by
an instance of a derived type, the constructors should at most have
protected access.
2018-04-07 18:04:41 -07:00
Tyler Gill baeb7e6a7c Added a new FilterType which is used by FilterEntry to represent a filter that should affect all files in one of the built-in filter groups.
This allows filter groups to be intermingled with other filters using the '{groupName}' syntax proposed by kenkendk.
It also means that when the filter that caused a file to be ignored is reported, it can report the name of the group, rather than a large and unreadable list of wildcard and regex patterns.
This is still missing several things (better documentation, removing the old --default-filters parameter, updating the UI), but should be another step in the right direction.
There might also might easily be other side effects that I haven't considered here that will need to be teased out and fixed.
2018-03-21 14:53:45 -06:00
Kenneth Skovhede e124329f1e Merge branch 'feature/improved-logging' 2018-03-16 08:38:14 +01: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 58ab443eb4 Fix generic class code references in XML documentation. 2018-03-07 18:34:26 -08: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 a49f63d82c Removed a number of unwanted translations for debug code 2018-02-11 20:46:44 +01:00
JonMikelV 4f0cf589ba Update duplicate error message to better distinguish failure point when error is thrown 2018-01-21 02:46:17 -06: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 SkovhedeandGitHub 36aadc4ad1 Merge pull request #2910 from warwickmm/refactor/remove_redundant_tostring
Remove redundant calls to ToString
2017-11-27 08:50:00 +01:00
Kenneth Hsu 5fb1958ceb Remove redundant calls to ToString. 2017-11-26 15:44:34 -08: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
Roberto Ribeiro 1ce4ccd61f Changed subqueries to improve folder browsing in restore 2017-11-15 15:16:25 -02:00
Kenneth Hsu 604b6e4337 Dispose enumerators after manually iterating over elements.
Since the IEnumerator<T> interface implements IDisposable, we should
make sure to dispose of the enumerator when manually iterating over the
elements.
2017-10-07 12:27:11 -07:00
Kenneth SkovhedeandGitHub 1df44989d2 Update LocalListChangesDatabase.cs
Fixed issue with filters and ListCchanges / Compare
2017-10-03 11:08:43 +02:00
Kenneth Skovhede 7ed1362e4c Merge branch 'master' into concurrent_processing
# Conflicts:
#	Duplicati/Library/Main/Operation/BackupHandler.cs
2017-09-27 09:58:29 +02:00
Kenneth Hsu 0738c5b624 Remove unnecessary call to String.Format. 2017-09-26 20:43:27 -07:00
Kenneth Hsu 4edf8536da Remove unused argument in string formatting. 2017-09-26 19:56:29 -07:00
Kenneth Hsu b84e7bd34d Avoid hard-coded parameter names.
This makes it easier to rename the parameter in the future as we don't
have to search for the parameter name within strings.
2017-09-25 19:54:54 -07:00
Kenneth Hsu e9ffc2cbe1 Add clearer exception message. 2017-09-25 19:54:54 -07: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 49a8bd12f6 Merge branch 'master' into concurrent_processing 2017-09-18 14:39:26 +02: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 4a6bf3deba Added "DeleteGraceTime" to all files deleted from the backend mananger.
This should fix a number of cases where the backup returns a consistency error because the deletion and the backend check happens before the backend is in sync.
2017-09-18 11:53:50 +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 8a116fbf8d Fixed verification query 2017-08-12 19:14:11 +01:00
Dan Stahr 4d98960e75 Fixed empty block handling.
Previously, empty files were associasted with empty blocks. These blocks were added to volumes which could result in empty, but valid volumes being garbage collected and valid file entries deleted.

This change changes the logic so that empty blocks are not stored at all.
2017-08-12 14:14:23 +01:00
Dan Stahr 3b422ff058 Fixed some of the failing tests in concurrent_processing branch 2017-08-06 11:32:11 +01:00
Dan Stahr 7c9b2fcd83 Fixed missed vacuum reference. 2017-08-04 12:26:15 +01:00
Dan Stahr 58a95e03e6 Autovacuum option added 2017-08-04 12:09:01 +01: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 c5de213635 Added the unique constraint.
This fixes #2302
This fixes #2537
2017-06-15 10:07:58 +02:00
Kenneth Skovhede f1793b82dd Merge branch 'master' of https://github.com/zed9h/duplicati into zed9h-master 2017-06-15 09:54:28 +02:00
Kenneth Skovhede 5f0ade5b0c Merge branch 'master' into concurrent_processing 2017-06-09 13:14:48 +02:00
Oliver Kötter 49b43a00d0 Stop iterating though the path if remaining path is \\
Fixes crash when restoring files backuped from unc paths 

Fixes #2469
2017-06-07 08:24:09 +02: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
Kenneth Skovhede fd14c1649b Fixed the query used to search for files.
This fixes #2471
2017-05-17 11:00:43 +02:00
Carlo "zED" Caputo 3e0447f342 Faster database recreation 2017-04-11 16:20:42 -03:00