-
Notifications
You must be signed in to change notification settings - Fork 173
Restic: refactors the cluster backup and restic management code #1283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
caffeinated92
wants to merge
17
commits into
develop
Choose a base branch
from
restic
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…rences throughout the codebase for improved clarity and functionality (#1279)
…queue modification
- Updated the PointInTimeMeta structure to use backupmgr package in api_database.go. - Cleaned up whitespace in SetActionForClusterSettings and GetBackups methods in repmanv3.go. - Deleted the archiver module as it is no longer needed. - Introduced a new backupmgr package with comprehensive backup management functionalities, including BackupMetadata, PointInTimeMeta, and various backup strategies. - Implemented ResticManager for handling backup tasks, including fetching, purging, and managing repository keys. - Enhanced error handling and logging throughout the backup process.
- Updated endpoint paths from /archives to /restic for consistency. - Renamed handler functions to reflect the new endpoint structure. - Adjusted documentation comments to match the new endpoint paths and functionality. - Ensured that all related handlers for backups and stats are correctly mapped to the new Restic terminology.
- Added new API endpoint to cancel Restic tasks in `api_cluster.go`. - Introduced `handlerMuxCancelResticTask` to handle cancellation requests. - Updated `cluster_grpc.pb.go` to use `dbhelper.Table` for schema handling. - Refactored React components to replace backup snapshot functionality with Restic snapshot and stats retrieval in `Home` and `Maintenance` pages. - Enhanced Redux slice to manage Restic snapshots, stats, and tasks, including new actions for fetching and purging snapshots. - Updated `clusterService.js` to include new Restic management functions. - Created a new `dbhelper/map.go` file for managing PFS queries and plugins. - Improved logging functionality in `restic.go` to support HTTP message logging.
…shot purge action
…er handling confirmation
…esume and pause actions
… update task queue modification routes
…cel, move, pause, and resume
…, and AddUnlockTask for improved task management
…proved task management
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request refactors the cluster backup and restic management code to replace the old
archiver-based implementation with a new, modularbackupmgr-based approach. The changes unify and modernize how restic backup tasks are managed, improve error handling, and introduce new queue management functions for restic operations.Key changes include:
Migration from
archivertobackupmgrfor Restic ManagementReplaced all references to
archiverwith the newbackupmgrpackage throughout the cluster codebase, including types, imports, and function calls. This affects initialization, task management, and configuration of restic backups. [1] [2] [3] [4] [5] [6] [7] [8] [9]Updated struct members in
Clusterto useResticManagerinstead ofResticRepo, andBackupMetaMapfrombackupmgrinstead ofconfig. [1] [2]Restic Task Queue Management Enhancements
Added new methods to manage the restic task queue, including adding, moving, canceling, clearing, running, and pausing tasks (
ResticModifyQueue,ResticCancelTask,ResticClearQueue,ResticRunQueue,ResticPauseQueue).Changed queue management functions to operate on the new
ResticManagerand itsTaskQueue.Improved Error Handling and Monitoring
Refactored error handling for restic operations, introducing
CheckResticErrorsand improving how errors are fetched, cleared, and reported as cluster states.Enhanced handling of configuration backup and restore, and improved backup config error reporting. [1] [2]
API and ACL Adjustments
/restic/snapshots,/restic/stats) instead of old/archivesendpoints.Miscellaneous Refactoring
backupmgr.BackupMethodinstead ofconfig.BackupMethod. [1] [2]dbhelperinstead ofconfigfor table mapping.These changes modernize the backup management infrastructure, improve maintainability, and lay the groundwork for future enhancements.