Exporting databases to STACKIT S3 buckets
Last updated on
Prerequisites
Section titled “Prerequisites”In order to follow the steps described on this page, the following conditions need to be met:
-
Your organization has a customer account.
(See: Create a customer account) -
You have a User Account with the necessary permissions.
(See: Create a user account) -
You have a Project in your customer account.
(See: Create a Project) -
You have created a Service Account.
(See: Create a Service account) -
You have assigned the required project permissions to this service account.
(See: Assign permissions to a service account) -
You have created an Access Token for this service account.
(See: Assign authentication token to a service account) -
You have created a SQLServer Flex Instance.
(See: Create a SQLServer Flex Instance) -
You are connected to the SQLServer Flex Instance.
(See: Connect to a SQLServer Flex Instances) -
You have previously created a database..
(See: Create databases in SQLServer Flex instances) -
You previously created a user and assigned the right server role to it.
(See: Create user)
(See: Server and project roles and permissions) -
You have a STACKIT S3 bucket.
Export a Database to a STACKIT S3 Bucket
Section titled “Export a Database to a STACKIT S3 Bucket”The stored procedure can be used on the STACKIT Flex SQLServer instances (Single and HA).
You can use any SQL Server query run tool that can run T-SQL against an SQL Server, e. g. SQL Server Management Studio, Azure Data Studio, or PowerShell.
-
Databases can be exported with the stored procedure
[msdb].[stackit].[export_database]. -
Parameter description. The procedure accepts various parameters
Parameter SQL data type Mandatory Default value Description @database_nameNVARCHAR(255)YES - Name of the database (observes naming conventions). @s3_urlNVARCHAR(255)YES N/A path to s3 bucket, must start with s3://. @s3_access_key_idNVARCHAR(255)YES N/A Access key for the STACKIT S3 bucket. @s3_secret_key_idNVARCHAR(255)YES N/A Secret key for the STACKIT S3 bucket. Example:
EXEC [msdb].[stackit].[export_database]@database_name = 'demo_db_1', @s3_url='s3://object.storage.eu01.onstackit.cloud/[FOLDER_NAME]', @s3_access_key_id = 'abc123', @s3_secret_key_id = 'xyz321'