Skip to content

Importing databases from STACKIT S3 buckets

Last updated on

You can perform on-demand imports of an SQLServer backup into your SQLServer Flex instance (Single and HA) from a STACKIT S3 bucket at any time.

In order to follow the steps described on this page, the following conditions need to be met:

Import a Database from a STACKIT S3 Bucket

Section titled “Import a Database from a STACKIT S3 Bucket”

Further requirements:

  • Access token with permission sqlserver-flex.restore.trigger (or equivalent for v3alpha1).
  • S3 Access Key and Secret with read access to the bucket.

Submit a database restore request from an external S3 source with a POST call.
Replace the placeholders with your actual project and instance details.

Curl example

Terminal window
curl https://mssql-flex-service.api.eu01.stackit.cloud/v3alpha1/projects/$PROJECT_ID/regions/$REGION/instances/$INSTANCE_ID/restores \
-D- \
-X POST \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"database_name": "'$NEW_DB_NAME'",
"source": {
"database_owner": "'$DBUSER'",
"logging_guid": "1",
"s3_details": {
"s3_access_key": "'$S3_ACCESS_KEY'",
"s3_access_secret": "'$S3_SECRET_KEY'",
"s3_bucket": "s3://object.storage.eu01.onstackit.cloud/$BUCKET_PATH/",
"s3_files": [
{
"file_number": 1,
"file_path": "s3://object.storage.eu01.onstackit.cloud/$BUCKET_PATH/file.bak"
}
]
},
"type": "EXTERNAL_S3"
}
}'

Parameter values

Response For a successfully initiated database import, the API responds with a 202 Accepted HTTP status code. The actual restoration process happens asynchronously in the background.

API response example

HTTP/2 202
date: Fri, 16 Jan 2026 14:30:00 GMT
traceparent: 00-5c32d68f7g64e96318fgcf12d568f9d3-fefc7e32157b6a1f-01
server: stackit
content-length: 0