diff --git a/docs/stackit_mongodbflex_backup_restore.md b/docs/stackit_mongodbflex_backup_restore.md index 87185a3e2..18dadd1a3 100644 --- a/docs/stackit_mongodbflex_backup_restore.md +++ b/docs/stackit_mongodbflex_backup_restore.md @@ -4,8 +4,8 @@ Restores a MongoDB Flex instance from a backup ### Synopsis -Restores a MongoDB Flex instance from a backup of an instance or clones a MongoDB Flex instance from a point-in-time snapshot. -The backup is specified by a backup ID and the point-in-time snapshot is specified by a timestamp. +Restores a MongoDB Flex instance from a backup of an instance or clones a MongoDB Flex instance from a point-in-time backup. +The backup can be specified by a backup ID or a timestamp. You can specify the instance to which the backup will be applied. If not specified, the backup will be applied to the same instance from which it was taken. ``` @@ -32,7 +32,7 @@ stackit mongodbflex backup restore [flags] --backup-instance-id string Instance ID of the target instance to restore the backup to -h, --help Help for "stackit mongodbflex backup restore" --instance-id string Instance ID - --timestamp string Timestamp of the snapshot to use as a source for cloning the instance in a date-time with the RFC3339 layout format, e.g. 2024-01-01T00:00:00Z + --timestamp string Timestamp to restore the instance to, in a date-time with the RFC3339 layout format, e.g. 2024-01-01T00:00:00Z ``` ### Options inherited from parent commands diff --git a/docs/stackit_mongodbflex_backup_update-schedule.md b/docs/stackit_mongodbflex_backup_update-schedule.md index ee51091cf..872f52835 100644 --- a/docs/stackit_mongodbflex_backup_update-schedule.md +++ b/docs/stackit_mongodbflex_backup_update-schedule.md @@ -19,8 +19,8 @@ stackit mongodbflex backup update-schedule [flags] Update the backup schedule of a MongoDB Flex instance with ID "xxx" $ stackit mongodbflex backup update-schedule --instance-id xxx --schedule '6 6 * * *' - Update the retention days for snapshots of a MongoDB Flex instance with ID "xxx" to 5 days - $ stackit mongodbflex backup update-schedule --instance-id xxx --save-snapshot-days 5 + Update the retention days for backups of a MongoDB Flex instance with ID "xxx" to 5 days + $ stackit mongodbflex backup update-schedule --instance-id xxx --store-for-days 5 ``` ### Options @@ -28,11 +28,11 @@ stackit mongodbflex backup update-schedule [flags] ``` -h, --help Help for "stackit mongodbflex backup update-schedule" --instance-id string Instance ID - --save-daily-snapshot-days int Number of days to retain daily snapshots. Should be less than or equal to the number of days of the selected weekly or monthly value. - --save-monthly-snapshot-months int Number of months to retain monthly snapshots - --save-snapshot-days int Number of days to retain snapshots. Should be less than or equal to the value of the daily backup. - --save-weekly-snapshot-weeks int Number of weeks to retain weekly snapshots. Should be less than or equal to the number of weeks of the selected monthly value. --schedule string Backup schedule, in the cron scheduling system format e.g. '0 0 * * *' + --store-daily-backup-days int Number of days to retain daily backups. Should be less than or equal to the number of days of the selected weekly or monthly value. + --store-for-days int Number of days to retain backups. Should be less than or equal to the value of the daily backup. + --store-monthly-backups-months int Number of months to retain monthly backups + --store-weekly-backup-weeks int Number of weeks to retain weekly backups. Should be less than or equal to the number of weeks of the selected monthly value. ``` ### Options inherited from parent commands diff --git a/internal/cmd/mongodbflex/backup/restore/restore.go b/internal/cmd/mongodbflex/backup/restore/restore.go index c043e4292..d74611db3 100644 --- a/internal/cmd/mongodbflex/backup/restore/restore.go +++ b/internal/cmd/mongodbflex/backup/restore/restore.go @@ -39,8 +39,8 @@ func NewCmd(p *print.Printer) *cobra.Command { Use: "restore", Short: "Restores a MongoDB Flex instance from a backup", Long: fmt.Sprintf("%s\n%s\n%s", - "Restores a MongoDB Flex instance from a backup of an instance or clones a MongoDB Flex instance from a point-in-time snapshot.", - "The backup is specified by a backup ID and the point-in-time snapshot is specified by a timestamp.", + "Restores a MongoDB Flex instance from a backup of an instance or clones a MongoDB Flex instance from a point-in-time backup.", + "The backup can be specified by a backup ID or a timestamp.", "You can specify the instance to which the backup will be applied. If not specified, the backup will be applied to the same instance from which it was taken.", ), Args: args.NoArgs, @@ -141,7 +141,7 @@ func configureFlags(cmd *cobra.Command) { cmd.Flags().Var(flags.UUIDFlag(), instanceIdFlag, "Instance ID") cmd.Flags().Var(flags.UUIDFlag(), backupInstanceIdFlag, "Instance ID of the target instance to restore the backup to") cmd.Flags().String(backupIdFlag, "", "Backup ID") - cmd.Flags().String(timestampFlag, "", "Timestamp of the snapshot to use as a source for cloning the instance in a date-time with the RFC3339 layout format, e.g. 2024-01-01T00:00:00Z") + cmd.Flags().String(timestampFlag, "", "Timestamp to restore the instance to, in a date-time with the RFC3339 layout format, e.g. 2024-01-01T00:00:00Z") err := flags.MarkFlagsRequired(cmd, instanceIdFlag) cobra.CheckErr(err) diff --git a/internal/cmd/mongodbflex/backup/update-schedule/update_schedule.go b/internal/cmd/mongodbflex/backup/update-schedule/update_schedule.go index cf296ea92..5b2f71bba 100644 --- a/internal/cmd/mongodbflex/backup/update-schedule/update_schedule.go +++ b/internal/cmd/mongodbflex/backup/update-schedule/update_schedule.go @@ -21,10 +21,10 @@ import ( const ( instanceIdFlag = "instance-id" scheduleFlag = "schedule" - snapshotRetentionDaysFlag = "save-snapshot-days" - dailySnapshotRetentionDaysFlag = "save-daily-snapshot-days" - weeklySnapshotRetentionWeeksFlag = "save-weekly-snapshot-weeks" - monthlySnapshotRetentionMonthsFlag = "save-monthly-snapshot-months" + snapshotRetentionDaysFlag = "store-for-days" + dailySnapshotRetentionDaysFlag = "store-daily-backup-days" + weeklySnapshotRetentionWeeksFlag = "store-weekly-backup-weeks" + monthlySnapshotRetentionMonthsFlag = "store-monthly-backups-months" // Default values for the backup schedule options defaultBackupSchedule = "0 0/6 * * *" @@ -62,8 +62,8 @@ func NewCmd(p *print.Printer) *cobra.Command { `Update the backup schedule of a MongoDB Flex instance with ID "xxx"`, "$ stackit mongodbflex backup update-schedule --instance-id xxx --schedule '6 6 * * *'"), examples.NewExample( - `Update the retention days for snapshots of a MongoDB Flex instance with ID "xxx" to 5 days`, - "$ stackit mongodbflex backup update-schedule --instance-id xxx --save-snapshot-days 5"), + `Update the retention days for backups of a MongoDB Flex instance with ID "xxx" to 5 days`, + "$ stackit mongodbflex backup update-schedule --instance-id xxx --store-for-days 5"), ), RunE: func(cmd *cobra.Command, args []string) error { @@ -121,10 +121,10 @@ func NewCmd(p *print.Printer) *cobra.Command { func configureFlags(cmd *cobra.Command) { cmd.Flags().Var(flags.UUIDFlag(), instanceIdFlag, "Instance ID") cmd.Flags().String(scheduleFlag, "", "Backup schedule, in the cron scheduling system format e.g. '0 0 * * *'") - cmd.Flags().Int64(snapshotRetentionDaysFlag, 0, "Number of days to retain snapshots. Should be less than or equal to the value of the daily backup.") - cmd.Flags().Int64(dailySnapshotRetentionDaysFlag, 0, "Number of days to retain daily snapshots. Should be less than or equal to the number of days of the selected weekly or monthly value.") - cmd.Flags().Int64(weeklySnapshotRetentionWeeksFlag, 0, "Number of weeks to retain weekly snapshots. Should be less than or equal to the number of weeks of the selected monthly value.") - cmd.Flags().Int64(monthlySnapshotRetentionMonthsFlag, 0, "Number of months to retain monthly snapshots") + cmd.Flags().Int64(snapshotRetentionDaysFlag, 0, "Number of days to retain backups. Should be less than or equal to the value of the daily backup.") + cmd.Flags().Int64(dailySnapshotRetentionDaysFlag, 0, "Number of days to retain daily backups. Should be less than or equal to the number of days of the selected weekly or monthly value.") + cmd.Flags().Int64(weeklySnapshotRetentionWeeksFlag, 0, "Number of weeks to retain weekly backups. Should be less than or equal to the number of weeks of the selected monthly value.") + cmd.Flags().Int64(monthlySnapshotRetentionMonthsFlag, 0, "Number of months to retain monthly backups") err := flags.MarkFlagsRequired(cmd, instanceIdFlag) cobra.CheckErr(err)