Commit Graph
239 Commits
Author SHA1 Message Date
Kenneth SkovhedeandGitHub 07da5662ff Merge pull request #5105 from Jojo-1000/fix-backend-requests-retired
Catch RetiredException in BackupHandler to avoid StopNow race condition
2024-03-04 13:33:58 +01:00
Kenneth Skovhede 40dd3c6816 Updated all license mentions to MIT 2024-02-28 15:45:30 +01:00
Jojo-1000 929e61f6b4 Catch RetiredException in BackupHandler to avoid StopNow race condition. 2024-02-22 18:48:44 +01:00
Kenneth Hsu e90eb3b2a3 Create custom Exception for remote list verification failures.
Previously, we would catch any Exception thrown by VerifyRemoteList and
perform an auto-cleanup (if specified in the options).  However, we
should only perform the auto-cleanup if VerifyRemoteList detected an
issue with the uploaded files.  Otherwise, an unrelated exception can
cause the database repair to be performed unnecessarily.  In the case of
a connection issue, this can leave the database in a corrupted state.

This fixes #4516.
2021-05-20 13:42:41 -07:00
Daniel Gehriger 7d2c6befb0 Using USN journal in CountFilesHandler 2020-08-17 15:08:15 +02: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
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
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
User 8755390dc8 don't store journal data for partial backups 2019-11-20 20:46:27 -08:00
Kenneth Hsu 93bc478d37 Issue warning when backup is cancelled by user.
Previously, a yellow warning icon would be displayed but the logs did
not contain any details regarding the cause of the warning.

This concerns issue #3982.
2019-11-10 11:20:11 -08:00
Kenneth SkovhedeandGitHub 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 SkovhedeandGitHub 153a972853 Merge branch 'master' into fix-stop-after-current-file 2019-09-17 10:06:36 +02:00
BlueBlock f1895acff5 add the fileset file to dlist
we also jsut set PartialBackup=false just to be clear and not assume the value
2019-09-10 13:05:45 -04:00
BlueBlock 7f73616614 add purging of deleted remote volumes 2019-09-07 17:16:34 -04:00
BlueBlock 9ae3f88dd5 Merge remote-tracking branch 'upstream/master' into fix-stop-after-current-file 2019-08-16 23:46:55 -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
BlueBlock ca736c74de update the backups stats also when a bcakup is cancelled
PostBackupVerification() was being skipped when a bcakup was cancelled. PostBackupVerification() will now be called.
2019-08-02 13:40:57 -04:00
drwtsn32x cfeabfb2dd Add auto vacuum interval option 2019-07-29 17:56:43 -07:00
BlueBlock 14e6068a5f Also stop the file enum process when the user has cancelled
The file enumeration process should also stop when the user has cancelled the operation.
2019-07-24 15:58:44 -04:00
BlueBlock b416c6c78b fix - do not throw exception in case where user has asked to cancel 2019-07-24 15:02:30 -04:00
BlueBlock 29a1a7c618 fix stop after the current file
'stop after upload' is now
stop after the current file' and the operation will cleanly allow the current file to complete.
2019-07-23 10:35:33 -04:00
Kenneth Hsu f954cf8bea Remove unused variable. 2019-07-06 12:45:48 -07:00
drwtsn32x 41a639ddc5 Show vacuum in status message 2019-04-18 21:04:31 -07:00
Kenneth Hsu 19981ae59d Simplify implementation of FlushBackend.
If the uploader throws an exception, we should not set the status of the
flush request and let the exception bubble up.
2019-03-31 19:38:42 -07:00
Kenneth Hsu da4dabe838 Fix typo in async property name. 2019-03-28 20:53:55 -07:00
Sean Templeton cc3e94fece Fix code review comments and other minor changes
- Rename indexVolume to indexVolumeWriter in DataBlockProcessor to reduce
confusion.

- When flushing the remaining uploads, check the tasks for exceptions in
completion order rather than waiting for them all at once. If there is an
exception all other uploads are cancelled anyway.

- Remove setting the operation progress as Backup_WaitForUpload in the
BackendUploader since the BackupHandler sets it.

- Use an exception filter in BackendUploader.

- Use Options property MaxUploadPrSecond instead of getting the raw value.
2019-03-13 21:51:06 -05:00
Sean Templeton 3de04da39e Run each upload on a separate thread
Added a small Worker class, private to the BackendUploader, to track the
upload tasks and the backend for each task.
2019-03-03 21:43:00 -06:00
Sean Templeton 1029d99e10 Simplify BackendUploader and remove unnecessary code 2019-03-03 21:42:58 -06:00
Sean Templeton 4f4529a88a Move upload related code from BackendHandler to BackendUploader
As the BackendUploader is in charge of uploads the code has been moved
there to centralize the responsibility and prepare for parallel uploads.
2019-03-03 21:35:09 -06:00
Kenneth Hsu 8a31eac5c0 Avoid potential null reference exception. 2019-02-18 12:50:46 -08:00
Kenneth Hsu b5d9451b33 Remove redundant casts. 2019-01-21 19:30:52 -08:00
Kenneth SkovhedeandGitHub b961fbd744 Merge pull request #3584 from Pectojin/remove_build_lookup_table_method
Remove unsed method and call
2019-01-13 10:31:24 +01:00
HendrikandGitHub c34c66bd34 Merge pull request #3582 from warwickmm/backup_test_percentage
Add option to specify percentage of samples for verification
2019-01-05 18:52:27 +01:00
Rune Henriksen f696842877 remove unsed method and call 2019-01-05 00:30:43 +01:00
Kenneth Hsu edfa7096f6 Add option to specify percentage of samples for verification.
This addresses issue #3296.
2019-01-02 15:51:19 -08:00
Kenneth Hsu a179a535c8 Rename local variables to better indicate that they are unused. 2018-12-31 14:59:47 -08: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