dcloud deploy host-database moveMove the database to managed Postgres in one step: dump, create the role and database there, restore, bind
Also needs deploy:ManageDatabaseBinding and rds:ModifyDBInstance on the database (with instanceClass: on all databases, and rds:CreateDBInstance; checked before anything is created). The database must be a publicly accessible Postgres, since a pool host reaches managed Postgres only on its public endpoint; with instanceClass it is created so. It may still be creating: the move waits for it. The app is bound only after the restore succeeded. Writes made between the dump and the switch are not carried over, so move at a quiet time. The pool-host copy is dropped; its dump is kept 30 days.
Synopsis
dcloud deploy host-database move id [flags]Arguments
<id>Requiredstring
Also accepted as
--id. Constraints: uuid
Flags
--db-instance-idOptionalstring
An existing managed Postgres database to move to; it may still be creating (the move waits). Give this or instanceClass
Constraints: 3-64 chars
--instance-classOptionalstring
Or create a managed Postgres named <app slug>-db of this instance class (as rds instances create --instance-class), single node, in the app’s region
Constraints: 1-32 chars
Example
dcloud deploy host-database move idGenerated from the API description, the same one the API checks requests against and the CLI is built from.