Skip to content

Commit a759aaf

Browse files
committed
generate docs
1 parent 32fba6c commit a759aaf

File tree

3 files changed

+57
-5
lines changed

3 files changed

+57
-5
lines changed

docs/stackit_mongodbflex_backup.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ stackit mongodbflex backup [flags]
3131
* [stackit mongodbflex](./stackit_mongodbflex.md) - Provides functionality for MongoDB Flex
3232
* [stackit mongodbflex backup describe](./stackit_mongodbflex_backup_describe.md) - Shows details of a backup for a MongoDB Flex instance
3333
* [stackit mongodbflex backup list](./stackit_mongodbflex_backup_list.md) - Lists all backups which are available for a MongoDB Flex instance
34+
* [stackit mongodbflex backup restore](./stackit_mongodbflex_backup_restore.md) - Restores a MongoDB Flex instance from a backup
3435
* [stackit mongodbflex backup restore-jobs](./stackit_mongodbflex_backup_restore-jobs.md) - Lists all restore jobs which have been run for a MongoDB Flex instance
3536
* [stackit mongodbflex backup schedule](./stackit_mongodbflex_backup_schedule.md) - Shows details of the backup schedule and retention policy of a MongoDB Flex instance
3637
* [stackit mongodbflex backup update-schedule](./stackit_mongodbflex_backup_update-schedule.md) - Updates the backup schedule and retention policy for a MongoDB Flex instance
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
## stackit mongodbflex backup restore
2+
3+
Restores a MongoDB Flex instance from a backup
4+
5+
### Synopsis
6+
7+
Restores a MongoDB Flex instance from a backup of an instance or clones a MongoDB Flex instance from a point-in-time snapshot.
8+
The backup is specified by a backup id and the point-in-time snapshot is specified by a timestamp.
9+
The instance to apply the backup to can be specified, otherwise it will be the same as the backup.
10+
11+
```
12+
stackit mongodbflex backup restore [flags]
13+
```
14+
15+
### Examples
16+
17+
```
18+
Restores a MongoDB Flex instance with id "yyy" using backup with id "zzz"
19+
$ stackit mongodbflex backup restore --instance-id yyy --backup-id zzz
20+
21+
Clone a MongoDB Flex instance with id "yyy" via point-in-time restore to timestamp "zzz"
22+
$ stackit mongodbflex backup restore --instance-id yyy --timestamp zzz
23+
24+
Restores a MongoDB Flex instance with id "yyy" using backup from instance with id "zzz" with backup id "aaa"
25+
$ stackit mongodbflex backup restore --instance-id zzz --backup-instance-id yyy --backup-id aaa
26+
```
27+
28+
### Options
29+
30+
```
31+
--backup-id string Backup id
32+
--backup-instance-id string Instance id of the target instance to restore the backup to
33+
-h, --help Help for "stackit mongodbflex backup restore"
34+
--instance-id string Instance id
35+
--timestamp string Timestamp of the snapshot to clone the instance from
36+
```
37+
38+
### Options inherited from parent commands
39+
40+
```
41+
-y, --assume-yes If set, skips all confirmation prompts
42+
--async If set, runs the command asynchronously
43+
-o, --output-format string Output format, one of ["json" "pretty" "none"]
44+
-p, --project-id string Project ID
45+
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
46+
```
47+
48+
### SEE ALSO
49+
50+
* [stackit mongodbflex backup](./stackit_mongodbflex_backup.md) - Provides functionality for MongoDB Flex instance backups
51+

internal/cmd/mongodbflex/backup/restore/restore.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ func NewCmd(p *print.Printer) *cobra.Command {
3939
Use: "restore",
4040
Short: "Restores a MongoDB Flex instance from a backup",
4141
Long: fmt.Sprintf("%s\n%s\n%s",
42-
"Restores a MongoDB Flex instance from a backup of an instance.",
43-
"The backup can be specified by either a backup id or a timestamp.",
44-
"The target instance can be specified, otherwise the target instance will be the same as the backup.",
42+
"Restores a MongoDB Flex instance from a backup of an instance or clones a MongoDB Flex instance from a point-in-time snapshot.",
43+
"The backup is specified by a backup id and the point-in-time snapshot is specified by a timestamp.",
44+
"The instance to apply the backup to can be specified, otherwise it will be the same as the backup.",
4545
),
4646
Args: args.NoArgs,
4747
Example: examples.Build(
@@ -139,9 +139,9 @@ func NewCmd(p *print.Printer) *cobra.Command {
139139

140140
func configureFlags(cmd *cobra.Command) {
141141
cmd.Flags().Var(flags.UUIDFlag(), instanceIdFlag, "Instance id")
142-
cmd.Flags().Var(flags.UUIDFlag(), backupInstanceIdFlag, "Backup instance id")
142+
cmd.Flags().Var(flags.UUIDFlag(), backupInstanceIdFlag, "Instance id of the target instance to restore the backup to")
143143
cmd.Flags().String(backupIdFlag, "", "Backup id")
144-
cmd.Flags().String(timestampFlag, "", "Timestamp of the backup")
144+
cmd.Flags().String(timestampFlag, "", "Timestamp of the snapshot to clone the instance from")
145145

146146
err := flags.MarkFlagsRequired(cmd, instanceIdFlag)
147147
cobra.CheckErr(err)

0 commit comments

Comments
 (0)