SQL Backup 10

SQBHostedStorageClient.exe

Backup to AWS storage is only available in SQL Backup Pro 9.0 and later. Backup to custom S3 or Azure hosted storage is only available in SQL Backup Pro 10.0 and later.


S3 buckets with glacier storage class are supported, 

SQL Backup Hosted Storage Client (SQBHostedStorageClient.exe) is a command-line utility that allows you to upload SQL Backup backups to a linked Hosted Storage Bucket. This is useful if:

  • You have existing SQL Backup backups that you want to upload to hosted storage as part of an off-site backup strategy.
  • You created a backup and selected the option to copy it to hosted storage, but the upload failed after being written successfully to disk.

You can also use the utility to link a SQL Server instance to a Hosted Storage account.

Syntax

CommandSyntaxDescription
uploadSQBHostedStorageClient.exe upload [-s3b|-cn|--s3BucketName|–containerName <bucket name>] [-az|--azure|--aws] [-cS3|–customS3 <custom-cloud-endpoint-if-applicable>] [-i|–instance <instance name>] [-p|–password <backup password>] <file name> [-F <folder name>]

Uploads the specified file to the Hosted Storage Bucket linked to the specified SQL Server instance.

Enter the full path to the SQL Backup backup file, for example: C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\MyBackup.sqb

Specify the Bucket name, otherwise the default bucket that you have linked to your SQL Server will be used.

Specify the type of Hosted Storage Bucket you are linked to. If you are using custom S3 storage you must specify an endpoint. The default Hosted Storage is AWS.

Specify the SQL Server instance that is linked to the Hosted Storage Bucket you want to upload to. If not specified, the default instance is used.

If the backup is encrypted, specify the backup password. SQL Backup Hosted Storage Client uses the password to read the backup metadata. The metadata and encrypted backup file are then uploaded to the Hosted Storage Bucket over a secure connection. The password is not sent.

If uploading to AWS or custom S3 storage, you can optionally specify a folder where to place the file when uploaded.

authorizeSQBHostedStorageClient.exe authorize [-az|--azure|--aws] [-cS3|--customS3=<custom-cloud-endpoint-if-applicable>] [-i|–instance <instance name>] [-f|--force] <AccountName> <AccountId/SecretKey> <BucketName>

Links the specified SQL Server instance to the Hosted Storage Bucket.

Specify the type of Hosted Storage Bucket you are linked to. If you are using custom S3 storage you must specify an endpoint. The default Hosted Storage is AWS.

Enter the AccountName, AccountId/SecretKey and the Bucket name you wish to associate to. If using AWS storage you may need to go to https://aws.amazon.com/ to sign up.

Specify the SQL Server instance that you want to link to the Hosted Storage account. If not specified, the default instance is used.

If the SQL Server instance is already linked to another account, use -f or --force to overwrite the current details.

Note: You can also link a SQL Server instance to an account from the Hosted Storage Settings in the SQL Backup GUI. For more information, see Cloud Storage Settings.

versionSQBHostedStorageClient.exe version

Displays version information for SQBHostedStorageClient.exe. 

If you are working with Red Gate Support, you may be asked to provide this information.

helpSQBHostedStorageClient.exe help <command>Displays help information for each command.

Using SQBHostedStorageClient.exe

  1. Open a Command Prompt window and find SQBHostedStorageClient.exe. SQBHostedStorageClient.exe is located in the same folder as the server components (by default %ProgramFiles%\Red Gate\SQL Backup 10\<instance name> on 32-bit machines or %ProgramFiles (x86)%\Red Gate\SQL Backup 10\<instance name> on 64-bit machines).
    Either, navigate to the folder in Windows Explorer, hold SHIFT, right-click and select Open command window here, or open a Command Prompt window anywhere and change directory to the relevant folder. For example:

    cd C:\ProgramFiles\Red Gate\SQL Backup 10\(Local)
  2. Type the relevant command and press ENTER.

Examples

Uploading backups to hosted storage

The following command uploads the backup C:\Backups\AdventureWorks_Full.sqb to the Hosted Storage account linked to the Production SQL Server:

SQBHostedStorageClient.exe upload -i Production C:\Backups\AdventureWorks_Full.sqb

The following command uploads the encrypted backup C:\Backups\Northwind_Full_20130102.sqb to the Hosted Storage account linked to the default SQL Server instance (local):

SQBHostedStorageClient.exe upload -p Password1 C:\Backups\Northwind_Full_20130102.sqb

Linking a SQL Server to a Hosted Storage account

The following command links the default SQL Server instance (local) to an AWS Hosted Storage account:

SQBHostedStorageClient.exe authorize --aws AccountAccessKey AccountSecretKey AccountBucketName

The following command links the default SQL Server instance (local) to an Azure Hosted Storage account:

SQBHostedStorageClient.exe authorize -az AccountName AccountId AccountContainerName

The following command links the Production SQL Server instance to a new Custom S3 Hosted Storage account, replacing the account it was previously linked to:

SQBHostedStorageClient.exe authorize -cS3 https://AccountEndpoint -i Production -f AccountAccessKey AccountSecretKey AccountBucketName

Didn't find what you were looking for?