database
Clone database
Creates a clone of a Managed Database service based on its {uuid}. It is possible to change location, plans and use the point in time feature to clone your service at a specific time using your backups. For PostgreSQL and MySQL, select the clone's plan with the plan_compute, plan_node_count, plan_storage_gib and plan_backups fields; the plan name field is deprecated for these engines.
post/1.3/database/{uuid}/clone
Request
- Base URL: https://api.upcloud.com
- URL: https://api.upcloud.com/1.3/database/{uuid}/clone
- Auth: HTTP bearer
Path parameters
uuidstring uuid required
The unique identifier for the integration.
Example:01234567-89ab-cdef-0123-456789abcdef
Service UUID
Request body
Example request
{
"hostname_prefix": "dev",
"plan": "starter-kit-plan",
"clone_time": "2024-01-30T15:04:05Z",
"backup_name": "daily-backup-2024-01-30",
"zone": "fi-hel1",
"termination_protection": false,
"maintenance": {
"dow": "monday",
"time": "03:00:00"
},
"additional_disk_space_gib": 10
}Response
Created
Example response
{
"uuid": "123e4567-e89b-12d3-a456-426614174000",
"zone": "fi-hel1",
"name": "my-db",
"title": "My Database Service",
"type": "pg",
"plan": "1x1xCPU-2GB-25GB",
"plan_components": {
"compute": {
"family": "standard",
"node_count": 2,
"cpu": 4,
"memory_gb": 8
},
"storage": {
"included_gib": 100,
"dynamic_storage_supported": true
},
"backups": {
"name": "regular",
"retention_days": 15
}
},
"additional_disk_space_gib": 10,
"state": "running",
"state_error": {
"init": "failed"
},
"powered": true,
"node_count": 1,
"create_time": "2023-10-01T12:00:00Z",
"update_time": "2023-10-10T12:00:00Z",
"service_uri": "postgres://upadmin:example-prefix-project@pg-2x2xcpu-4gb-50gb-de-fra1-example-prefix-project.db.upclouddatabases.com:11550/defaultdb?sslmode=require",
"service_uri_params": {
"dbname": "defaultdb",
"host": "pg-2x2xcpu-4gb-50gb-de-fra1-example-prefix-project.db.upclouddatabases.com",
"password": "example-prefix-project",
"port": "11550",
"ssl_mode": "require",
"user": "upadmin"
},
"maintenance": {
"dow": "Monday",
"time": "02:00:00",
"pending_updates": [
{
"deadline": "2022-01-21T12:21:00Z",
"description": "description related to the update",
"start_after": "2022-01-21T12:21:00Z",
"start_at": "2022-10-21T12:21:00Z"
}
]
},
"metadata": {
"owner": "team-databases"
},
"properties": {
"public_access": false
},
"networks": [
{
"uuid": "123e4567-e89b-12d3-a456-426614174000",
"name": "example-private-network",
"family": "IPv4",
"type": "private",
"create_time": "2025-08-01T10:40:04.140473Z",
"update_time": "2025-08-01T10:40:04.140473Z"
}
],
"node_states": [
{
"name": "node-1",
"role": "master",
"state": "running",
"progress_updates": [
{
"completed": false,
"current": 45,
"max": 100,
"min": 0,
"phase": "prepare",
"unit": "bytes_uncompressed"
}
]
}
],
"labels": [
{
"key": "environment",
"value": "production"
}
],
"backups": [
{
"backup_name": "pg-backup-2024-01-01",
"backup_time": "2024-01-01T12:00:00Z",
"data_size": 36413440
}
],
"components": [
{
"component": "pg",
"host": "pg-2x2xcpu-4gb-50gb-de-fra1-example-prefix-project.db.upclouddatabases.com",
"port": 1150,
"route": "dynamic",
"usage": "replica",
"ssl": true
}
],
"connection_pools": [
{
"connection_uri": "postgresql://user:password@hostname:5432/dbname",
"database": "pg-db-1",
"pool_mode": "session",
"pool_name": "pool-2",
"pool_size": 10,
"username": "updamin"
}
],
"users": [
{
"username": "admin",
"password": "my-password",
"authentication": "caching_sha2_password",
"type": "admin"
}
],
"databases": [
{
"name": "postgres",
"lc_collate": "en_US.UTF-8",
"lc_ctype": "en_US.UTF-8"
}
],
"acls": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"permission": "read-write",
"topic": "sensors/temperature",
"username": "user123"
}
],
"service_integrations": [
{
"uuid": "123e4567-e89b-12d3-a456-426614174000",
"type": "rsyslog",
"source_name": "my-database",
"source_uuid": "123e4567-e89b-12d3-a456-426614174000",
"destination_name": "my-rsyslog-server",
"destination_uuid": "123e4567-e89b-12d3-a456-426614174000",
"state": "active",
"state_error": [],
"node_states": [
{
"name": "node-1",
"status": "running",
"errors": [
"some error"
],
"likely_error_cause": null
}
],
"properties": {
"key1": "value1",
"key2": 2,
"key3": true
}
}
]
}Changes
No recorded changes to this operation across all 1 revision of this API.