SQBHostedStorageClient.exe
Published 23 March 2017
This version of SQBHostedStorageClient.exe is only available with SQL Backup Pro 9.0 and later.
SQL Backup Hosted Storage Client (SQBHostedStorageClient.exe) is a command-line utility that allows you to upload SQL Backup backups to an Amazon S3 Bucket. This is useful if:
- You have existing SQL Backup backups that you want to upload to your Amazon S3 Bucket 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
Command | Syntax | Description |
---|---|---|
upload | SQBHostedStorageClient.exe upload [-s3b=<bucket name>] [-i|–instance=<instance name>] [-p|–password=<backup password>] <file name> [-F=<folder name>] | Uploads the specified file to the Amazon S3 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 S3 Bucket name, otherwise the default bucket that you have linked to your SQL Server will be used. Specify the SQL Server instance that is linked to the Amazon S3 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 Amazon S3 Bucket over a secure connection. The password is not sent. You can optionally specify a folder where to place the file uploaded to your Amazon S3 Bucket. |
authorize | SQBHostedStorageClient.exe authorize [-i|–instance=<instance name> [-f|--force] <S3Key> <S3Secret> <S3BucketName> | Links the specified SQL Server instance to the Amazon S3 Bucket. Enter the S3Key, S3Secret and the Bucket name you wish to associate to. You 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 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 AWS Storage Settings. |
version | SQBHostedStorageClient.exe version | Displays version information for SQBHostedStorageClient.exe. If you are working with Red Gate Support, you may be asked to provide this information. |
help | SQBHostedStorageClient.exe help <command> | Displays help information for each command. |
Using SQBHostedStorageClient.exe
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 9\<instance name> on 32-bit machines or %ProgramFiles (x86)%\Red Gate\SQL Backup 9\<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 9\(Local)
- 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 a Hosted Storage account:
SQBHostedStorageClient.exe authorize S3Key S3Secret S3BucketName
The following command links the Production SQL Server instance to a new Hosted Storage account, replacing the account it was previously linked to:
SQBHostedStorageClient.exe authorize -i=Production -f S3Key S3Secret S3BucketName