Commit Graph
2357 Commits
Author SHA1 Message Date
Kenneth Hsu 34f961b5e0 Remove unused Options.HasDeleteOlderThan property.
The last reference was removed in revision
3b70f99722.
2020-01-26 12:53:09 -08:00
Kenneth Hsu 4e8505e003 Remove unused Options.ParseLogLevel method.
This was introduced in revision 842fd96543
without any usages.
2020-01-26 12:51:01 -08:00
Kenneth Hsu 0c2555bde4 Remove unused Options.SetCompressionModuleDefault method.
The last reference was removed in revision
c7836ce403.
2020-01-26 10:30:48 -08:00
Kenneth Hsu 81eaaa1204 Remove unused Options.SetEncryptionModuleDefault method.
The last reference was removed in revision
c7836ce403.
2020-01-26 10:29:40 -08:00
Kenneth Hsu 855b1e2135 Remove unused Options.DEFAULT_READ_BUFFER_SIZE field.
The last reference was removed in revision
89191a6caf.
2020-01-26 10:27:39 -08:00
Kenneth Hsu 69005a64f7 Remove unused BackendManager.FlushDbMessages method.
The last reference was removed in revision
8abdf87188.
2020-01-26 10:18:19 -08:00
Kenneth Hsu e241a17af6 Remove unused BackendManager.CreateFolder method.
This was introduced in revision aca4ed95cc
but without any apparent usages.
2020-01-26 10:18:19 -08:00
Kenneth Hsu 7d3d03c06f Remove unused BackendManager.LastException property.
The last reference was removed in revision
8abdf87188.
2020-01-26 10:18:19 -08:00
Kenneth Hsu d847b46716 Remove unused BackendManager.HasDied property.
The last reference was removed in revision
8abdf87188.
2020-01-26 10:18:19 -08:00
Kenneth Hsu d7e3ac9b10 Move CreateFilesetFile method to FilesetVolumeWriter class.
This only concerns filesets, so it does not belong in the base class.
2020-01-25 18:53:15 -08:00
Kenneth Hsu 3551238000 Remove redundant calls to String.Format. 2020-01-25 17:07:02 -08:00
Kenneth SkovhedeandGitHub a64671a0c6 Merge pull request #4018 from warwickmm/refactor/fileset_removal
Refactor fileset deletion code and add tests
2020-01-23 13:52:43 +01:00
warwickmmandGitHub e1937f21b8 Merge pull request #4054 from seantempleton/compactblocklist
Write blocklists when compacting files
2020-01-22 17:22:55 -08:00
Kenneth Hsu 35ea890f96 Merge remote-tracking branch 'upstream/master' into refactor/fileset_removal 2020-01-21 20:23:49 -08:00
Sean Templeton 04662bace1 Write blocklists when compacting files
The list folder was not being written to dindex files when performing a
compact operation. After the data blocks have been moved to a new volume
and the new volume data is finished being written to the new index file,
read the blocklists from the database and write them to the new index
file.
2020-01-19 21:57:08 -06: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
Sean Templeton 3b6306b556 Fix exceptions caused by Stop Now
The LocalDatabase class was deleting from the BlocklistHash table based on the volume id of blocks. The deletes for the Blockset and BlocksetEntry tables were using a union query which included the same query the BlocklistHash delete was using. Changed the BlocklistHash delete query to use the union as well to ensure that all three tables would use the same query to delete the necessary rows. This fixes the "Detected non-empty blocksets with no associated blocks!" error.

Moved a write call in the DataBlockProcessor to send a volume for upload after setting blockvolume to null. This prevents a null reference exception because otherwise it would be sent to the SpillCollector and it tries to add a block, but the volume has already been closed.

Added the ? operator to the RegistryUtility class to prevent a null reference exception while debugging. It was annoying catching it in the debugger.

Fixes #4037
2020-01-05 21:43:56 -06:00
Kenneth Hsu fdcef72a7c Merge remote-tracking branch 'upstream/master' into refactor/fileset_removal 2020-01-01 13:58:59 -08:00
Max 7e2218663e Add Compat Analyzers 2019-12-25 19:08:52 +01:00
Max 28793ef204 packages update 2019-12-25 18:21:24 +01:00
Max 41a5591532 upstream 2019-12-25 16:34:56 +01:00
Kenneth Hsu a7ab5f6f00 Avoid unnecessary array creation and sorting.
This also removes a redundant timestamp conversion, as it already occurs
in the DropFilesetsFromTable method.
2019-12-15 14:06:20 -08:00
Kenneth Hsu 610fa4ffea Generate backup version numbers manually instead of in query.
The ROW_NUMBER window function is not available in SQLite versions prior
to 3.25.  In some cases, I think we do fall back to the system SQLite
libraries, and many distributions do not have versions that support the
window functions.  To be safe, we will generate the backup versions
manually.
2019-12-15 13:28:44 -08: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 Hsu 60b4c8479c Fix bug where filesets considered for deletion had wrong version.
The ID in the Fileset table is the auto-incremented integer.  When
considering filesets for deletion (in particular, when deleting specific
versions), we need to reference the backup version number that is
exposed to the user (integers where the newest backup version is 0).
2019-12-12 18:38:17 -08:00
Kenneth Hsu 9cb602b171 Reorder classes to simplify diff. 2019-12-11 20:43:34 -08:00
Kenneth Hsu 68ffd86594 Refactor fileset deletion code.
This extracts the logic for various fileset deletion strategies into
separate classes.  This simplifies the code and makes it easier to test
the individual functionalities.
2019-12-11 17:59:20 -08:00
warwickmmandGitHub 514fc90bd1 Merge pull request #3992 from warwickmm/unhide_partial_filesets
Fix various issues related to partial backups
2019-12-07 10:36:13 -08:00
Kenneth Hsu 53a35e6e06 Remove support for Amazon Cloud Drive.
Amazon discontinued access to the Cloud Drive API.

See https://forum.duplicati.com/t/amazon-cloud-drive-discontinued/7391.
2019-12-01 10:36:36 -08:00
Kenneth Hsu 0f30604046 Add comment clarifying partial fileset in synthetic filelist. 2019-11-30 13:38:04 -08:00
Kenneth Hsu 20eb785f09 Simplify implementation of keep-versions logic. 2019-11-29 19:45:40 -08:00
Kenneth Hsu 39ba32c383 Remove redundant conditional expression. 2019-11-29 09:10:27 -08:00
Kenneth Hsu b4bef4bea0 Clarify comment. 2019-11-29 09:10:27 -08:00
Kenneth Hsu a47175a945 Fix bug in keep-versions logic where dangling partials were removed.
If the most recent backups were partials (and not followed by a full
backup), they should not be removed.  A partial backup should only be
removed if it is followed by a full backup.

This concerns issue #3982.
2019-11-29 09:10:27 -08:00
Kenneth Hsu fa3ffb7540 Add comment to explain download of dlist files during direct restore. 2019-11-28 20:16:57 -08:00
HendrikandGitHub 057a012277 Merge pull request #3998 from drwtsn32x/fix-attribute-masking
Disable file attribute masking on Windows 10
2019-11-27 11:38:27 +01:00
drwtsn32x 942d8b820d removed getter 2019-11-26 19:27:46 -08:00
Kenneth Hsu 861f0ffa1b Ensure that one full backup is kept when processing keep-time.
this concerns issue #3982.
2019-11-23 12:20:56 -08:00
drwtsn32x f599336bf0 tweak for codacity 2019-11-22 08:26:38 -08:00
drwtsn32x 77a1e3b88a disable attribute masking 2019-11-22 08:00:58 -08:00
Kenneth Hsu cd08ca919a Include fileset file in synthetic filelist.
We declare this to be a partial backup, with the presumption being that
a synthetic filelist is only created when a backup is interrupted.

This concerns issue #3982.
2019-11-21 19:14:48 -08:00
Kenneth Hsu 51b4ecfb28 Include fileset file in dlist files after purge operation.
This concerns issue #3982.
2019-11-21 19:08:55 -08:00
HendrikandGitHub c37eb1680d Merge pull request #3995 from drwtsn32x/fix-issue-3971
Fix issue 3971 - Don't store USN journal data for partial backups
2019-11-21 22:46:51 +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
User 8755390dc8 don't store journal data for partial backups 2019-11-20 20:46:27 -08:00
Kenneth Hsu 8ab64071f0 Display correct backup type when using direct restore.
Previously, all filesets would be displayed as partial.  Now, we obtain
the partial/full type from the fileset file (not the fileset.json) file
in the dlist file.  If this file does not exist, the backup type
defaults fo full.

Note that this requires downloading and uncompressing the dlist file, so
performance of populating the restore list may be impacted
significantly.

This concerns issue #3982.
2019-11-20 20:23:48 -08:00
drwtsn32x 8f9ec70680 only warn if delete failure is confirmed 2019-11-19 20:28:14 -08:00
Kenneth Hsu 17d72be7ff Remove intermediate partial backups in delete handler.
If surrounded by full backups, partial backups are assumed to be no
longer necessary.

This concerns issue #3982.
2019-11-19 19:48:40 -08:00
Kenneth Hsu 4950e7c225 Unhide partial filesets from Sets property getter.
This concerns issue #3982.
2019-11-19 19:30:01 -08:00
Kenneth Hsu c395e77bc2 Unhide partial filesets from QuickSets property getter.
This concerns issue #3982.
2019-11-19 19:29:59 -08:00