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.
Prerequisites
Section titled “Prerequisites”- An active project containing anSQLServer Flex instance.
- STACKIT S3 Bucket
- Database .bak file uploaded to the STACKIT S3 Bucket note: Only non encrypted Backups
Create a database backup
Section titled “Create a database backup”- Access token with permission
sqlserver-flex.restore.trigger(or equivalent for v3alpha1) - S3 Access Key and Secret with read access to the bucket.
Import
Section titled “Import”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
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
| Parameter | Description |
|---|---|
| TOKEN | Valid access token with restore permissions |
| PROJECT_ID | Project ID where the instance is located |
| REGION | Region where the instance was created (e.g., eu01) |
| INSTANCE_ID | SQLServer Flex instance ID |
| NEW_DB_NAME | The name the database will have after import |
| S3_ACCESS_KEY | Access key for the STACKIT S3 bucket |
| S3_SECRET_KEY | Secret key for the STACKIT S3 bucket |
| s3_files.file_path | Full S3 URI to the .bak file (e.g., s3://host/path/file.bak) |
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 202date: Fri, 16 Jan 2026 14:30:00 GMTtraceparent: 00-5c32d68f7g64e96318fgcf12d568f9d3-fefc7e32157b6a1f-01server: stackitcontent-length: 0