Commit Graph
59 Commits
Author SHA1 Message Date
Kenneth Skovhede 40dd3c6816 Updated all license mentions to MIT 2024-02-28 15:45:30 +01:00
Kenneth Hsu dd902ce7b2 Remove misleading comment.
The retention policy logic was changed, and this comment was leftover
from the old implementation.

https://forum.duplicati.com/t/new-retention-policy-deletes-old-backups-in-a-smart-way/2195/34?u=ts678

This fixes #3306.
2020-09-03 19:48:47 -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
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
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
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 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
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 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 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 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
BlueBlock fc5297f151 clarify comment 2019-08-31 16:35:57 -04:00
BlueBlock 9a4c120958 remove 1 line of commented code 2019-08-31 16:32:23 -04:00
BlueBlock f3d31a840a rename variable to clarify it relates to full backups 2019-08-31 16:32:05 -04:00
BlueBlock 8b42e247a5 license update 2019-08-30 12:38:54 -04:00
BlueBlock 3285699965 remove unused using 2019-08-30 12:38:14 -04:00
BlueBlock a918529413 GetFilesetsToDelete() to enforce sorting
it expects it to be sorted so it should sort it
2019-08-30 12:37: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
Kenneth Skovhede 040655b579 Possible fix for #2857 2018-12-07 09:46:10 +01:00
Kenneth Hsu f12858e6a5 Mark fields that shouldn't be reassigned as readonly.
This makes it explicit at compile-time that these fields should not be
reassigned outside the constructor.
2018-05-25 10:04:52 -07: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
Daniel Radünz 6da001cbe9 Easier syntax for unlimited timeframes and intervals
Also refactored retention policy option to use a list of custom objects instead of a dictionary to reduce confusion when working with the values of the retention policy
2018-02-21 21:30:17 +01:00
Daniel Radünz d249d23bdd Comply with option allow-full-removal when applying retention policy 2018-02-11 17:18:30 +01:00
Daniel Radünz 7bc9a81312 Delete backups outside of any retention policy time frame 2018-02-11 10:07:37 +01:00
Daniel Radünz e6f0356351 Renamed variables to better convey content and usage 2018-01-28 00:36:31 +01:00
Daniel Radünz 2d725784a2 Changed order of checks for which backups to delete 2018-01-28 00:35:58 +01:00
Daniel Radünz ed5daa60b5 Simplified code by removing one loop 2017-09-30 22:05:54 +02:00
Daniel Radünz 0a4a6edca1 Renamed all occurrences of "staggered version" to "retention policy" 2017-09-30 22:05:30 +02:00
Daniel Radünz 40db42b29b Moved code related to deciding which backups to delete from Options into the DeleteHandler
Added logging
2017-09-30 22:05:29 +02:00
Kenneth Skovhede 37e42b718d Fix not shutting down backendmanager if it is required for something else.
This fixes #2759
2017-09-26 22:45:24 +02:00
Kenneth Skovhede e0d8a57ccc Added re-use of the backend across the operations in the backup step.
This should fix the AmzCD consistency issue where it does not wait for the listing after performing a delete.
2017-09-18 11:54:48 +02:00
Kenneth Skovhede 816ac4e722 Changed the way the delete handler deals with --allow-full-removal 2017-01-11 13:51:30 +01:00
Kenneth Skovhede a029890409 Implemented better default error messsages 2017-01-09 11:35:38 +01:00
Kenneth Skovhede 1108d51d7f Implemented a new new list-broken-files and purge-broken-files command for the commandline to assist with handling remote file loss. 2017-01-05 16:46:01 +01:00
Kenneth Skovhede 4bf4871427 Added commandline operation to purge select files from filesets.
This fixes #1009.
This paves the way for #1337.
2016-12-29 22:41:13 +01:00
Kenneth Skovhede 0c68daff6c Fixed all whitespace to be 4 spaces instead of tabs 2016-09-15 11:39:27 +02:00
Kenneth Skovhede 9bfc39120a Improved handling the compaction process with errors, such that deletes are marked and commited to the database before actually being deleted, causing fewer issues when resuming the operation afterwards. 2015-11-17 21:32:55 +01:00
Kenneth Skovhede e13978d1c0 Improved handling of non-standard blocksize and hashing algorithms 2015-04-08 20:33:30 +02:00
Kenneth Skovhede 3c595b61c9 Fixed duplicate logging of operation results 2014-07-16 00:57:57 +02:00
Kenneth Skovhede bd53090ae7 Implemented the pause/resume/stop/start methods throughout the calls to allow for interactive control over the tasks 2014-05-15 12:47:16 +02:00
Kenneth Skovhede 73f422b0aa Improved output from delete command 2013-08-26 15:25:37 +02:00
Kenneth Skovhede 140b3575ee Fixed output from delete command so it includes size 2013-08-25 07:49:31 +02:00
Kenneth Skovhede 83f9979efe Fixed not auto-compacting on delete 2013-07-01 17:55:45 +02:00