Export database backup from STACKIT S3 bucket from SQLServer Flex
Prerequisites
Section titled “Prerequisites”In order to follow the steps described on this page, the following conditions need to be met:
-
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 execution tool that can execute 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'