Skip to content

Import database backup from STACKIT S3 into SQLServer Flex

You can take on‑demand imports of a Backup into your SQLServer Flex databases at any time.

  • An active project containing anSQLServer Flex instance.
  • STACKIT S3 Bucket
  • Database .bak file uploaded to the STACKIT S3 Bucket note: Only non encrypted Backups
  • 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