upctl database create
Create a new database
For pg and mysql, select the plan by its components with --plan-compute,
--plan-node-count, --plan-storage-gib, and --plan-backups. When any of these
flags is given, the omitted ones use their defaults. Run "upctl database plans
--plan is deprecated for pg and mysql, but still supported. Run "upctl database
plans
Examples
upctl database create \
--title mydb \
--zone fi-hel1 \
--hostname-prefix mydb
upctl database create \
--title mydb \
--zone fi-hel1 \
--type pg \
--hostname-prefix mydb \
--plan-compute rdb.standard.2CPU-8GB \
--plan-node-count 2 \
--plan-storage-gib 120 \
--plan-backups regular
upctl database create \
--title mydb \
--zone fi-hel1 \
--type pg \
--hostname-prefix mydb \
--plan 2x2xCPU-4GB-100GB \
--enable-termination-protection \
--label env=dev \
--property max_connections=200
Options
| Option | Description |
|---|---|
--hostname-prefix |
A host name prefix for the database |
--title |
A short, informational description. |
--plan |
Deprecated for pg and mysql, use the --plan-* flags instead. Plan name, required for database types other than pg and mysql. |
--plan-compute |
Compute shape for pg and mysql, see the Compute shape column of "upctl database plans Default: rdb.standard.2CPU-8GB |
--plan-node-count |
Number of nodes for pg and mysql. Default: 2 |
--plan-storage-gib |
Total storage per node in GiB for pg and mysql. Default: 100 |
--plan-backups |
Backup tier for pg and mysql. Default: regular |
--zone |
Zone where to create the database. Run upctl zone list to list all available zones. |
--type |
Type of the database Default: mysql |
--maintenance-dow |
Full name of weekday in English, lower case(sunday) for automatic maintenance day of the week. Set randomly if not provided. Requires --maintenance-time. |
--maintenance-time |
Database time in UTC of automatic maintenance HH:MM:SS. Set randomly if not provided. Requires --maintenance-dow. |
--label |
Labels to describe the database in key=value format, multiple can be declared.Usage: --label env=dev --label owner=operations Default: [] |
--network |
A network interface for the database, multiple can be declared. Usage: --network name=network-name,family=IPv4,type=private,uuid=030e83d2-d413-4d19-b1c9-af05cdb60c1f Default: [] |
--enable-termination-protection |
Enable termination protection to prevent the database instance from being powered off or deleted. |
--property |
Properties for the database in key=value format. Can be specified multiple times.Default: [] |
--wait |
Wait for database to be in running state before returning. |
--help, -h |
help for create Default: false |
Global options
| Option | Description |
|---|---|
--client-timeout, -t |
Client timeout to use in API calls. Default: 0s |
--config |
Configuration file path. |
--debug |
Print out more verbose debug logs. Default: false |
--force-colours |
Force coloured output despite detected terminal support. |
--no-colours |
Disable coloured output despite detected terminal support. Colours can also be disabled by setting NO_COLOR environment variable. |
--output, -o |
Output format. Valid values are human, json and yaml.Default: human |
Related commands
| Command | Description |
|---|---|
| upctl database | Manage databases |