Skip to content
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

Update backup:restore command resources options #1461

Merged
merged 2 commits into from
Aug 2, 2024

Conversation

pjcdawkins
Copy link
Collaborator

@pjcdawkins pjcdawkins commented Jun 28, 2024

Closes platformsh/cli#190

Usage:
 upsun backup:restore [--target TARGET] [--branch-from BRANCH-FROM] [--no-code] [--no-resources] [--resources-init RESOURCES-INIT] [-p|--project PROJECT] [-e|--environment ENVIRONMENT] [-W|--no-wait] [--wait] [--] [<backup>]

Arguments:
  backup                               The ID of the backup. Defaults to the most recent one

Options:
      --target=TARGET                  The environment to restore to. Defaults to the backup's current environment
      --branch-from=BRANCH-FROM        If the --target does not yet exist, this specifies the parent of the new
                                       environment
      --no-code                        Do not restore code, only data.
      --no-resources                   Do not override the target's existing resource settings.
      --resources-init=RESOURCES-INIT  Set the resources to use for new services: backup, parent, default or minimum.
                                       If not set, "backup" will be used.

@pjcdawkins pjcdawkins added the needs new version Depends on a new version of Platform.sh label Jun 28, 2024
Copy link
Member

@akalipetis akalipetis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Shall we query the Git version before including this option? How does the API respond on version 26 if we include it in the restore request?

@pjcdawkins
Copy link
Collaborator Author

I missed a fairly important part - now added.

Shall we query the Git version before including this option? How does the API respond on version 26 if we include it in the restore request?

Normally we want every server to be upgraded before releasing the CLI feature; it's just simpler.

Those eager to use the API feature in the meantime can play with:

upsun project:curl 'backups/some-backup-ID/restore' --json '{"restore_resources": false}'

@pjcdawkins pjcdawkins merged commit 9c3bbcb into main Aug 2, 2024
2 checks passed
@pjcdawkins pjcdawkins deleted the backup-restore-resources-updates branch August 2, 2024 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs new version Depends on a new version of Platform.sh
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Restore backup without the resources on Upsun
2 participants