Skip to content

upctl database create

Create a new database

upctl database create [flags]

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 \
                --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 Plan to use for the database. Run upctl database plans [database type] to list all available plans.
Default: 2x2xCPU-4GB-100GB
--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.
--maintenance-time Database time in UTC of automatic maintenance HH:MM:SS. Set randomly if not provided.
--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
Command Description
upctl database Manage databases