AWS
Taking backups to AWS
- Steps to follow in AWS
Create an AWS S3 bucket
Create an IAM role
- a. Obtain the ARN from the ClickHouse Cloud service settings page, under Network security information, which looks similar to this:
- b. For this role create the trust policy as follows:
Update permissions for role
- Steps to follow in ClickHouse Cloud
Follow the steps below in the ClickHouse Cloud console to configure the external bucket:
Change external backup
Configure AWS IAM Role ARN and S3 bucket details
Save changes
Changing the backup schedule from the default schedule
View backups stored in your bucket
Restoring backups from AWS
Follow the steps below to restore backups from AWS:Create a new service to restore to
Add service ARN
Get SQL command used to restore backup
Run the restore command
GCP
Taking backups to GCP
Follow the steps below to take backups to GCP:Steps to follow in GCP
Create a GCP storage bucket
Generate an HMAC Key and Secret
-
a. Create a service account
- I. Navigate to the IAM & Admin section in the Google Cloud Console and select
Service Accounts. - II. Click
Create Service Accountand provide a name and ID. ClickCreate and Continue. - III. Grant the Storage Object User role to this service account.
- IV. Click
Doneto finalize the service account creation.
- I. Navigate to the IAM & Admin section in the Google Cloud Console and select
-
b. Generate the HMAC key
- I. Go to Cloud Storage in the Google Cloud Console, and select
Settings - II Go to the Interoperability tab.
- III. In the
Service account HMACsection, clickCreate a key for a service account. - IV. Choose the service account you created in the previous step from the dropdown menu.
- V. Click
Create key.
- I. Go to Cloud Storage in the Google Cloud Console, and select
-
c. Securely store the credentials:
- I. The system will display the Access ID (your HMAC key) and the Secret (your HMAC secret). Save these values, as the secret won’t be displayed again after you close this window.
Steps to follow in ClickHouse Cloud
Follow the steps below in the ClickHouse Cloud console to configure the external bucket:Change external backup
Settings page, click on Change external backupConfigure GCP HMAC Key and Secret
Save external bucket
Save External Bucket to save the settings.Changing the backup schedule from the default schedule
Settings page.
If configured differently, the custom schedule and retention setting apply to
backups written to your bucket. Backups in the ClickHouse Cloud-managed bucket
use the default schedule (backups every 24 hours) and default retention policy.View backups stored in your bucket
Restoring backups from GCP
Follow the steps below to restore backups from GCP:Create a new service to restore to
Get SQL command used to restore backup
access or restore a backup link above the list of backups in the
UI to get the SQL command to restore the backup. The command should look like this,
and you can pick the appropriate backup from the dropdown to get the restore
command for that specific backup. You will need to add your secret access key
to the command:Run SQL command to restore backup
Azure
Taking backups to Azure
Follow the steps below to take backups to Azure:Steps to follow in Azure
Create a storage account
Get connection string
- a. In your storage account overview, look for the section called
Security + networkingand click onAccess keys. - b. Here, you will see
key1andkey2. Under each key, you’ll find aConnection stringfield. - c. Click
Showto reveal the connection string. Copy the connection string which you will use to for set-up on ClickHouse Cloud.
Steps to follow in ClickHouse Cloud
Follow the steps below in the ClickHouse Cloud console to configure the external bucket:Change external backup
Settings page, click on Change external backupProvide connection string and container name for your Azure storage account
Save external bucket
Save External Bucket to save the settingsChanging the backup schedule from the default schedule
View backups stored in your bucket
Restoring backups from Azure
To restore backups from Azure, follow the steps below:Create a new service to restore to
Get SQL command used to restore backup
access or restore a backup link above the list of backups in the
UI to obtain the SQL command to restore the backup. The command should look like
this, and you can pick the appropriate backup from the dropdown to get the
restore command for that specific backup. You will need to add your Azure
storage account connection string to the command.Run SQL command to restore backup