- 
                Notifications
    
You must be signed in to change notification settings  - Fork 29
 
feat: create backup and restore subcommand #2834
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Jeffrey Tang <[email protected]>
…network-backup-restore
Signed-off-by: Jeffrey Tang <[email protected]>
Signed-off-by: Jeffrey Tang <[email protected]>
Signed-off-by: Jeffrey Tang <[email protected]>
Signed-off-by: Jeffrey Tang <[email protected]>
Signed-off-by: Jeffrey Tang <[email protected]>
Signed-off-by: Jeffrey Tang <[email protected]>
Signed-off-by: Jeffrey Tang <[email protected]>
Signed-off-by: Jeffrey Tang <[email protected]>
Signed-off-by: Jeffrey Tang <[email protected]>
Signed-off-by: Jeffrey Tang <[email protected]>
Signed-off-by: Jeffrey Tang <[email protected]>
Signed-off-by: Jeffrey Tang <[email protected]>
Signed-off-by: Jeffrey Tang <[email protected]>
Signed-off-by: Jeffrey Tang <[email protected]>
Signed-off-by: Jeffrey Tang <[email protected]>
Signed-off-by: Jeffrey Tang <[email protected]>
Signed-off-by: Jeffrey Tang <[email protected]>
…network-backup-restore Signed-off-by: Jeffrey Tang <[email protected]> # Conflicts: # examples/README.md
Signed-off-by: Jeffrey Tang <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a new backup and restore feature for Solo deployments, allowing users to backup and restore complete network configurations including ConfigMaps, Secrets, logs, and state files. The implementation adds a new config ops backup/restore command structure.
Key changes:
- Added 
BackupRestoreCommandwithbackupandrestoresubcommands - Modified 
NetworkNodes.getLogs()andNetworkNodes.getStatesFromPod()to accept optional base directory parameters - Updated 
NodeCommandTasks.uploadStateFiles()to support both single state files and directories of state files - Changed compression from tar to zip for better compatibility
 - Added new backup-restore workflow example with comprehensive documentation
 
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description | 
|---|---|
| src/commands/backup-restore.ts | New command implementation for backup/restore operations | 
| src/commands/command-definitions/backup-restore-command-definition.ts | Command definition and configuration for backup-restore | 
| src/commands/commands.ts | Registered new backup-restore command | 
| src/commands/node/tasks.ts | Enhanced uploadStateFiles to support directory-based state file restoration | 
| src/core/dependency-injection/inject-tokens.ts | Added injection tokens for BackupRestoreCommand | 
| src/core/dependency-injection/container-init.ts | Registered BackupRestoreCommand in DI container | 
| src/core/network-nodes.ts | Modified getLogs and getStatesFromPod to accept optional base directory | 
| examples/backup-restore-workflow/Taskfile.yml | New example workflow demonstrating backup/restore operations | 
| examples/backup-restore-workflow/README.md | Comprehensive documentation for the backup-restore workflow | 
| examples/state-save-and-restore/Taskfile.yml | Updated paths and reduced transaction counts for testing | 
| examples/README.md | Added reference to new backup-restore-workflow example | 
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]> Signed-off-by: JeffreyDallas <[email protected]>
Co-authored-by: Copilot <[email protected]> Signed-off-by: JeffreyDallas <[email protected]>
Signed-off-by: Jeffrey Tang <[email protected]>
…iero-ledger/solo into 02784-D-network-backup-restore Signed-off-by: Jeffrey Tang <[email protected]> # Conflicts: # src/commands/backup-restore.ts
Signed-off-by: Jeffrey Tang <[email protected]>
Signed-off-by: Jeffrey Tang <[email protected]>
Signed-off-by: Jeffrey Tang <[email protected]>
          Log Metrics - One Shot SingleJSON Log Metrics | 
    
          E2E Test Report  8 files   87 suites   1h 11m 38s ⏱️ Results for commit f62e7fa. ♻️ This comment has been updated with latest results.  | 
    
          Coverage summary from CodacySee diff coverage on Codacy
 Coverage variation details
 Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch:  Diff coverage details
 Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified:  See your quality gate settings Change summary preferences | 
    
Signed-off-by: Jeffrey Tang <[email protected]>
          Log Metrics - Block NodeJSON Log Metrics | 
    
          Log Metrics - External database newJSON Log Metrics | 
    
          Log Metrics - IntegrationJSON Log Metrics | 
    
          Log Metrics - Dual Cluster FullJSON Log Metrics | 
    
Description
This pull request changes the following:
Only partial of backup and restore command feature as discussed in solo network backup and restore #2784
create backup and restore subcommands
saving and restore following critical data
minor change to use zip for state file compress
a new example Taskfile workflow to test backup and restore command
The following feature has not been implemented:
Related Issues
Pull request (PR) checklist
package.jsonchanges have been explained to and approved by a repository managerTesting
The following manual testing was done:
The following was not tested:
Commit message guidelines
We use 'Conventional Commits' to ensure that our commit messages are easy to read, follow a consistent format, and for automated release note generation. Please follow the guidelines below when writing your commit messages: