backups
The backups commands manage the backups Kinsta keeps of an environment, and the downloadable archives you can take off Kinsta.
kinstactl backups list my-site --env livekinstactl backups create my-site --env live --tag "before plugin update"Backups belong to an environment. Without --env, the site’s only environment is used; see Sites and environments. Creating, restoring and deleting wait for Kinsta to finish by default, and accept --no-wait, --timeout <minutes> and --dry-run; see operations.
backups list
Section titled “backups list”List the backups of an environment, newest first.
kinstactl backups list my-site --env staging --type manualkinstactl backups list [site] [options]List the backups of an environment, newest first
Arguments
| Argument | Description |
|---|---|
site | site name or ID |
Options
| Option | Description |
|---|---|
--env <name> | environment (default: the only one) |
--type <type> | only this backup type, e.g. manual, scheduled or system |
Global options --profile, --json and --no-input apply too. See scripting and CI.
Kinsta API: GET /sites/environments/{env_id}/backups
The table shows the backup ID, its type, the note and when it was created. You need the ID for backups restore and backups delete. --type keeps only one kind of backup, for example manual, scheduled or system.
backups create
Section titled “backups create”Create a manual backup.
kinstactl backups create my-site --env live --tag "before plugin update"kinstactl backups create [site] [options]Create a manual backup
Arguments
| Argument | Description |
|---|---|
site | site name or ID |
Options
| Option | Description |
|---|---|
--env <name> | environment (default: the only one) |
--tag <text> | label for the backup |
--dry-run | print the resolved target and request; change nothing |
--no-wait | return the operation ID instead of waiting |
--timeout <minutes> | give up waiting after this many minutes (default 30) |
Global options --profile, --json and --no-input apply too. See scripting and CI.
Kinsta API: POST /sites/environments/{env_id}/manual-backups
Take a manual backup before a risky change such as a plugin update or an env push. --tag labels the backup so you recognise it later.
backups restore
Section titled “backups restore”Restore a backup, replacing the environment.
kinstactl backups restore <site> <backup-id> [options]Restore a backup, replacing the environment
Arguments
| Argument | Description |
|---|---|
site | site name or ID |
backup-id | backup ID, see: backups list |
Options
| Option | Description |
|---|---|
--env <name> | environment to restore to (default: the only one) |
--from-env <environment> | environment the backup was taken on (default: --env) |
--notify <email> | company user to notify when the restore finishes |
--dry-run | print the resolved target and request; change nothing |
--no-wait | return the operation ID instead of waiting |
--timeout <minutes> | give up waiting after this many minutes (default 30) |
--yes | skip the confirmation prompt |
Global options --profile, --json and --no-input apply too. See scripting and CI.
Kinsta API: GET /sites/environments/{env_id}/backups, GET /company/{id}/users, POST /sites/environments/{target_env_id}/backups/restore
Restoring replaces the content of the environment with the backup, so the command asks for confirmation. On a terminal you answer a prompt; in a script pass --notify <email> and --yes. Without --notify a script fails with USAGE (there is no user to notify), and without --yes it fails with CONFIRMATION_REQUIRED (exit code 5). --notify takes the email of a company user, who is notified when the restore finishes.
By default the backup is restored onto the environment it was taken on. With --from-env you restore a backup taken on another environment of the same site onto --env, for example a staging backup onto live:
kinstactl backups restore my-site 123456789 --from-env staging --env live --notify [email protected]The backup ID is looked up in --from-env, and the confirmation names both environments, so you can see that the content of live is about to be replaced by a backup from staging.
backups delete
Section titled “backups delete”Delete a backup.
kinstactl backups delete my-site 123456789 --env staging --yeskinstactl backups delete <site> <backup-id> [options]Delete a backup
Arguments
| Argument | Description |
|---|---|
site | site name or ID |
backup-id | backup ID, see: backups list |
Options
| Option | Description |
|---|---|
--env <name> | environment (default: the only one) |
--dry-run | print the resolved target and request; change nothing |
--no-wait | return the operation ID instead of waiting |
--timeout <minutes> | give up waiting after this many minutes (default 30) |
--yes | skip the confirmation prompt |
Global options --profile, --json and --no-input apply too. See scripting and CI.
Kinsta API: GET /sites/environments/{env_id}/backups, DELETE /sites/environments/backups/{backup_id}
The backup is looked up first, and the confirmation shows its ID and creation time. On a terminal you answer a prompt; in a script pass --yes.
backups downloadable list
Section titled “backups downloadable list”List the downloadable backup archives of an environment.
kinstactl backups downloadable list my-site --env livekinstactl backups downloadable list [site] [options]List the downloadable backup archives of an environment
Arguments
| Argument | Description |
|---|---|
site | site name, display name or ID |
Options
| Option | Description |
|---|---|
--env <environment> | environment name or ID |
Global options --profile, --json and --no-input apply too. See scripting and CI.
Kinsta API: GET /sites, GET /sites/environments/{env_id}/downloadable-backups
A downloadable backup is an archive you can download from Kinsta, as opposed to the backups above, which you can only restore. The table shows when each archive was created and when it expires.
backups downloadable create
Section titled “backups downloadable create”Create a downloadable backup archive.
kinstactl backups downloadable create my-site --env livekinstactl backups downloadable create [site] [options]Create a downloadable backup archive
Arguments
| Argument | Description |
|---|---|
site | site name, display name or ID |
Options
| Option | Description |
|---|---|
--env <environment> | environment name or ID |
--dry-run | print the resolved target and request; change nothing |
--no-wait | return the operation ID instead of waiting |
--timeout <minutes> | give up waiting after this many minutes (default 30) |
Global options --profile, --json and --no-input apply too. See scripting and CI.
Kinsta API: GET /sites, POST /sites/environments/{env_id}/downloadable-backups, GET /sites/environments/{env_id}/downloadable-backups
When the archive is ready, the command prints its download link. With --no-wait it returns the operation ID instead, and you collect the link later with backups downloadable list. Kinsta limits how often you can create one; check that with backups downloadable quota first.
backups downloadable quota
Section titled “backups downloadable quota”Check whether a new downloadable backup can be created.
kinstactl backups downloadable quota my-site --env livekinstactl backups downloadable quota [site] [options]Check whether a new downloadable backup can be created
Arguments
| Argument | Description |
|---|---|
site | site name, display name or ID |
Options
| Option | Description |
|---|---|
--env <environment> | environment name or ID |
Global options --profile, --json and --no-input apply too. See scripting and CI.
Kinsta API: GET /sites, GET /sites/environments/{env_id}/next-downloadable-backup-available
The command prints available when you can create a new archive now, and otherwise when the next one becomes available.