Skip to content

Copies

All operations require authentication.

5 operationsv1/hosting/privateDatabase
Agent setup

List database copiesProduction

GET
/1.0/hosting/privateDatabase/{serviceName}/database/{databaseName}/copy

Returns the IDs of the copies of the database.

Path parameters

databaseName
required
string

Database name

serviceName
required
string

Service name

Response

200string[]successful operation

Example uses databaseName = string, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/hosting/privateDatabase/{serviceName}/database/{databaseName}/copy \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
[ "00000000-0000-0000-0000-000000000000"]

Create a database copyProduction

POST
/1.0/hosting/privateDatabase/{serviceName}/database/{databaseName}/copy

Creates a copy of the database. The copy expires at the expiration date given in the response.

Path parameters

databaseName
required
string

Database name

serviceName
required
string

Service name

Response

200Copysuccessful operation
creationDate
read-only
stringdate-time

Creation date of the database copy

expirationDate
read-only
stringdate-time

Expiration date of the database copy

id
read-only
stringuuid

Database copy ID

lastUpdate
read-only
stringdate-time

Last update of the database copy

status
read-only
StatusEnum

Database copy status

Valuesdoingdoneerrortodo

Example uses databaseName = string, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/hosting/privateDatabase/{serviceName}/database/{databaseName}/copy \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "creationDate": "2024-01-01T12:00:00Z", "expirationDate": "2024-01-01T12:00:00Z", "id": "00000000-0000-0000-0000-000000000000", "lastUpdate": "2024-01-01T12:00:00Z", "status": "doing"}

Get a database copyProduction

GET
/1.0/hosting/privateDatabase/{serviceName}/database/{databaseName}/copy/{id}

Returns the status, creation date and expiration date of the copy.

Path parameters

databaseName
required
string

Database name

id
required
stringuuid

Id

serviceName
required
string

Service name

Response

200Copysuccessful operation
creationDate
read-only
stringdate-time

Creation date of the database copy

expirationDate
read-only
stringdate-time

Expiration date of the database copy

id
read-only
stringuuid

Database copy ID

lastUpdate
read-only
stringdate-time

Last update of the database copy

status
read-only
StatusEnum

Database copy status

Valuesdoingdoneerrortodo

Example uses databaseName = string, id = 00000000-0000-0000-0000-000000000000, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/hosting/privateDatabase/{serviceName}/database/{databaseName}/copy/{id} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "creationDate": "2024-01-01T12:00:00Z", "expirationDate": "2024-01-01T12:00:00Z", "id": "00000000-0000-0000-0000-000000000000", "lastUpdate": "2024-01-01T12:00:00Z", "status": "doing"}

Delete a database copyProduction

DELETE
/1.0/hosting/privateDatabase/{serviceName}/database/{databaseName}/copy/{id}

Deletes the copy immediately, before its expiration date. A deleted copy can no longer be restored.

Path parameters

databaseName
required
string

Database name

id
required
stringuuid

Id

serviceName
required
string

Service name

Response

200—successful operation

Example uses databaseName = string, id = 00000000-0000-0000-0000-000000000000, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/hosting/privateDatabase/{serviceName}/database/{databaseName}/copy/{id} \
  -H "authorization: Bearer $OVH_TOKEN"

Restore a database copyProduction

POST
/1.0/hosting/privateDatabase/{serviceName}/database/{databaseName}/copyRestore

Restores a copy into the database. The database is not flushed before the restore unless requested.

Path parameters

databaseName
required
string

Database name

serviceName
required
string

Service name

Request body (required)

copyId
required
stringuuid

Copy ID

flushDatabase
boolean

Whether to flush the database before restoring the copy (default to false)

Response

200Tasksuccessful operation
databaseName
read-only
string

Database name on which the task is working

doneDate
read-only
stringdate-time

Completion date

dumpId
read-only
integer

DumpId on which the task is working

function
read-only
FunctionEnum

Function name

ValuesabusechangeFtpPasswordchangeRamchangeVersionconfiguration/updatecreatedatabase/copydatabase/copyRestoredatabase/createdatabase/deletedatabase/dumpdatabase/dump/deletedatabase/extension/createdatabase/extension/deletedatabase/importdatabase/restoredatabase/wizarddeletegrant/creategrant/deletegrant/updateinstalloverquota/inoverquota/outquotaRefreshrefreshreopenrestartstartstopsuspenduser/changePassworduser/createuser/deletewebhostingNetwork/disablewebhostingNetwork/enablewhitelist/createwhitelist/deletewhitelist/update
id
read-only
integer

The id of the task

lastUpdate
read-only
stringdate-time

Last update

startDate
read-only
stringdate-time

Task creation date

status
read-only
StatusEnum

Task status

Valuescancelleddoingdoneerrortodo
userName
read-only
string

User name on which the task is working

Example uses databaseName = string, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/hosting/privateDatabase/{serviceName}/database/{databaseName}/copyRestore \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "databaseName": "string", "doneDate": "2024-01-01T12:00:00Z", "dumpId": 0, "function": "abuse", "id": 0, "lastUpdate": "2024-01-01T12:00:00Z", "startDate": "2024-01-01T12:00:00Z", "status": "cancelled", "userName": "string"}