STAC-24630: Add stackgraph-v2 backup/restore#32
Conversation
140322e to
fbd2289
Compare
| cmd := &cobra.Command{ | ||
| Use: "abort", | ||
| Short: "Abort a partially backfilled restore.", | ||
| Long: "Abort a partially backfilled restore. This will not load (backfill) any data but keep the data as is." + |
There was a problem hiding this comment.
Please provide examples how to run this command. The same for backfill
There was a problem hiding this comment.
Would you put an example in the docs or in the --help section? (or both?)
There was a problem hiding this comment.
Put an example in the docs and improved the 'description'
|
|
||
| func backfillCmd(globalFlags *config.CLIGlobalFlags) *cobra.Command { | ||
| cmd := &cobra.Command{ | ||
| Use: "backfill", |
There was a problem hiding this comment.
Is it supposed to be executed by the user directly?
There was a problem hiding this comment.
I'll try to clarify when this should be used
There was a problem hiding this comment.
I clarified both in the 'description' portion of the help command and in the docs
| K8sClient: appCtx.K8sClient, | ||
| Namespace: appCtx.Namespace, | ||
| JobName: checkJobName, | ||
| ServiceName: "stackgraph", |
There was a problem hiding this comment.
Should it be stackgraph-v2 ?
| } | ||
|
|
||
| // waitAndCleanupRestoreJob waits for job completion and cleans up resources | ||
| func waitAndCleanupRestoreJob(k8sClient *k8s.Client, namespace, jobName string, log *logger.Logger) error { |
There was a problem hiding this comment.
I think this command should have its own version of PrintWaitingMessage (https://github.com/StackVista/stackstate-backup-cli/blob/main/internal/orchestration/restore/job.go#L83) Explaininig backfill and abort command. This way it would more clear to the user.
There was a problem hiding this comment.
I think it should explain scenarios when the user have to run either of these commands.
sts-backup stackgraph-v2 backfill. The restore command will automatically restore both theliveandbackfillportion of a backup. If, however, the restore command gets interrupted (through CTRL-C) or fails due to instability the cluster, this command can be used to restart the backfill job, restoring thebackfillportion of the data.sts-backup stackgraph-v2 abort. If restoring thebackfillportion of a backup cannot be recovered or is lost somehow,abortcan be used to wrap up the restore command with the data that got already ingested successfully. This command is really a last resort and should not be needed in normal operation.
There was a problem hiding this comment.
gotcha, i improve the message for restore, but also for backfill/abort and checkAndFinalize so the user knows what follow-up actions are possible.
Adds documentation for the new sstackgraph backup/restore v2. The interaction is documented in this docs PR: rancher/stackstate-product-docs#360