{question}
Can you provide a practical example of how to perform a SingleStore database backup to Azure Blobs?
{question}
{answer}
If you want to backup the database testDB
to the Azure container backups
in the path 2011_11_03
with the account name acct_backup
that has the access key QDRXb9TxuWc5AeksOwTH5dnU2pSM6BF6LADMtVMCMrZRXHFX+lAYy594QUDykAxSn4fMDGwqzqHTdQ3B1smgog==
you can do it with the SQL command:
BACKUP DATABASE testDB TO Azure "backups/2011_11_03" CREDENTIALS '{"account_name":"acct_backup","account_key":"QDRXb9TxuWc5AeksOwTH5dnU2pSM6BF6LADMtVMCMrZRXHFX+lAYy594QUDykAxSn4fMDGwqzqHTdQ3B1smgog=="}';
To do the same thing with sdb-admin create-backup
you need to set first the env variables AZURE_STORAGE_KEY
and AZURE_STORAGE_ACCOUNT
and set the repository string to azure://<container>/path
.
For the example above, the full set of steps would be:
export AZURE_STORAGE_ACCOUNT=acct_backup export AZURE_STORAGE_KEY=QDRXb9TxuWc5AeksOwTH5dnU2pSM6BF6LADMtVMCMrZRXHFX+lAYy594QUDykAxSn4fMDGwqzqHTdQ3B1smgog== sdb-admin create-backup -r azure://backups/2011_11_03 testDB
{answer}