platformsh / legacy-cli

This is the legacy version of Platform.sh's command-line interface. The new version is at: https://github.com/platformsh/cli
https://docs.platform.sh/administration/cli.html
MIT License
224 stars 121 forks source link

Update backup:restore command resources options #1461

Open pjcdawkins opened 6 days ago

pjcdawkins commented 6 days ago

Closes https://github.com/platformsh/cli/issues/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 commented 3 days ago

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}'