Commit Graph
656 Commits
Author SHA1 Message Date
Daniel Gehriger 7d2c6befb0 Using USN journal in CountFilesHandler 2020-08-17 15:08:15 +02:00
Kenneth Hsu be44b785ce Remove unnecessary local variable. 2020-07-01 16:50:29 -07:00
Kenneth Hsu 3aa1d2f3da Ensure that paths exist when restoring empty files.
This fixes #4148.
2020-07-01 16:13:32 -07:00
Kenneth SkovhedeandGitHub 5168d05ebf Merge pull request #4161 from warwickmm/refactor/verify_remote_list_setup
Remove boilerplate code in calls to VerifyRemoteList
2020-05-10 21:04:42 +02:00
Kenneth Hsu de1b89167b Rename local variable. 2020-04-05 12:00:51 -07:00
Kenneth Hsu d92a436bad Fix spelling error in local variable name. 2020-04-05 11:46:32 -07:00
Kenneth Hsu b53770b589 Add VerifyRemoteList overload to reduce duplicated code. 2020-04-05 11:46:08 -07:00
Kenneth Hsu 0c9ca9a75c Remove unused BackendHandler members. 2020-03-29 16:48:19 -07:00
Kenneth SkovhedeandGitHub e45b8c4b2e Merge pull request #4049 from seantempleton/filesetdifference
Fix unexpected difference in fileset when using Stop Now
2020-03-25 07:11:04 +01:00
Kenneth SkovhedeandGitHub c95def65f5 Merge pull request #4122 from warwickmm/fix_upload_retry_attempts
Fix log message for retried upload operations
2020-03-25 06:58:14 +01:00
Sean Templeton 9739517b0a Fix bandwidth throttling inconsistency
In code the throttling generally works backwards than what one would expect.
The streams that are throttled are the streams that operate on files from the local machine.
This fixes the download throttling not working and the upload throttling applying to
both uploads and downloads.

When doing a Put operation the stream on the local machine is reading from the
local filesystem and hence the upload throttle bytes per second needs to be
applied to the reading of the stream, not the writing.

Similarly when doing a Get operation the download throttle bytes per second needs
to be applied to the writing of the stream.

Fixes #4115
2020-03-04 19:57:48 -06:00
Sean Templeton d5e064ae45 Fix a few more issues with stop now
When a backup is interrupted it will now show as a partial backup in the list of backups on the restore files page.

Temporary filelist volumes are protected from deletion in several places. All but the RestoreHandler
only protect the most recent filelist. The RestoreHandler protects all temporary filelist volumes as the user
might be restoring from one that would be deleted.

Prevent the CoCoL BackendRequests channel is retired exception from appearing when the backup is stopped by checking
if the channel is retired before trying to add the FlushRequest to the channel. Any exceptions from the BackendUploader
task will still be thrown.
2020-03-01 21:19:07 -06:00
warwickmmandGitHub b1d1972cb8 Merge pull request #4114 from seantempleton/syntheticfilelist
Fix issue with synthetic filelist not being uploaded
2020-03-01 12:39:08 -08:00
Kenneth Hsu 197a15e032 Fix log message for retried upload operations.
The number of attempts is one (the first attempt) plus the number of
retries.
2020-03-01 12:07:05 -08:00
Rod Savard 1b0f5a8cb0 add descriptive reason for usn soft failure 2020-02-25 15:34:42 -08:00
Sean Templeton 446120ae3e A synthetic filelist could not be uploaded due to the logic in UploadSyntheticFilelist. The code passing in the fileset id to the class would get the id based on if the volume was in the Temporary or Uploading states. If the volume was in the Uploading state, present on the remote backend, and of the right size it would get changed to Uploaded.
One of the first things UploadSyntheticFilelist does is throw an exception if the volume is not in the Uploaded state. Or if it is in the Uploaded state, the next check would prevent a synthetic filelist from being created if the volume was not in the Uploading or Temporary states.

Removed the check for the volume not being in the Uploaded state as the warning in the second check handles that case.

Removed the using statement as it would dispose of the FilesetVolumeWriter after passing it to the UploadChannel. The UploadChannel could not use it since it had been disposed.

Fixed the GetRemoteVolumeFromIDAsync taking a fileset id and matching it up against a volume id. Now it will use fileset id to get the volume that matches the fileset.

Change the StopNow disruption test to not use a synthetic file list. The test was written with it not working and therefore fails a check on the number of filesets after stopping a backup.

Bonus fix for a possible null exception in Dispose for VolumeWriterBase.
2020-02-23 16:50:36 -06:00
Kenneth Hsu 19303614f0 Remove unnecessary call to ToString. 2020-02-18 17:50:26 -08:00
Kenneth Hsu 7e86486f59 Fix logs for custom retention policy to show backup times.
When we modified the code in revision
68ffd86594 (pull request #4018) to
consider collections of IListResultFilesets instead of DateTimes, we
neglected to preserve the backup times in the logs.

This fixes #4109.
2020-02-18 17:50:13 -08:00
warwickmmandGitHub 44f619b725 Merge pull request #4085 from drwtsn32x/improve-usn-snapshot-fails
Improve USN and Snapshot error handling
2020-02-06 19:36:42 -08:00
Rod Savard 235f94c96f change to use custom exception class 2020-02-06 06:34:49 -08:00
Rod Savard 63ddc52744 log warning not error when usn policy is On 2020-02-03 21:55:43 -08:00
Rod Savard ec8f897460 log information event when snap policy is Auto 2020-02-03 21:50:27 -08:00
Rod Savard 57d36df981 improve error msg on snapshot failure 2020-02-03 21:47:11 -08:00
Rod Savard a85c10fd8c move config hash calculation to UsnJournalService 2020-02-02 15:09:23 -08:00
Rod Savard 685c77a018 remove unused parameter 2020-02-01 23:15:26 -08:00
Rod Savard 0a9880c6cf change config hash calculation 2020-02-01 13:34:21 -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
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 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 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
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
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
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