You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/cloud/manage/backups/export-backups-to-own-cloud-account.md
+55-14Lines changed: 55 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -61,18 +61,19 @@ You will need the following details to export/restore backups to your own CSP st
61
61
2. Access HMAC key and HMAC secret.
62
62
63
63
<hr/>
64
-
# Backup / Restore
64
+
65
+
# Backup / restore {#backup-restoer}
65
66
66
67
:::note:::
67
68
1. For restoring the backup from your own bucket into a new service, you will need to update the trust policy of your backups storage bucket to allow access from the new service.
68
69
2. The Backup / Restore commands need to be run from the database command line. For restore to a new service, you will first need to create the service and then run the command.
69
70
:::
70
71
71
-
## Backup / Restore to AWS S3 Bucket {#backup--restore-to-aws-s3-bucket}
72
+
## Backup / restore to AWS S3 bucket {#backup--restore-to-aws-s3-bucket}
72
73
73
-
### Take a DB Backup {#take-a-db-backup}
74
+
### Take a DB backup {#take-a-db-backup}
74
75
75
-
**Full Backup**
76
+
**Full backup**
76
77
77
78
```sql
78
79
BACKUP DATABASE test_backups
@@ -86,11 +87,11 @@ You will need to use a different UUID for each new backup in this subdirectory,
86
87
For example, if you are taking daily backups, you will need to use a new UUID each day.
87
88
:::
88
89
89
-
**Incremental Backup**
90
+
**Incremental backup**
90
91
91
92
```sql
92
93
BACKUP DATABASE test_backups
93
-
TO S3('https://testchbackups.s3.amazonaws.com/backups/<uuid>', '<key id>', '<key secret>')
94
+
TO S3('https://testchbackups.s3.amazonaws.com/backups/<uuid>/my_incremental', '<key id>', '<key secret>')
@@ -104,11 +105,11 @@ FROM S3('https://testchbackups.s3.amazonaws.com/backups/<uuid>', '<key id>', '<k
104
105
105
106
See: [Configuring BACKUP/RESTORE to use an S3 Endpoint](/operations/backup#configuring-backuprestore-to-use-an-s3-endpoint) for more details.
106
107
107
-
## Backup / Restore to Azure Blob Storage {#backup--restore-to-azure-blob-storage}
108
+
## Backup / restore to Azure Blob Storage {#backup--restore-to-azure-blob-storage}
108
109
109
-
### Take a DB Backup {#take-a-db-backup-1}
110
+
### Take a DB backup {#take-a-db-backup-1}
110
111
111
-
**Full Backup**
112
+
**Full backup**
112
113
113
114
```sql
114
115
BACKUP DATABASE test_backups
@@ -117,7 +118,7 @@ TO AzureBlobStorage('<AzureBlobStorage endpoint connection string>', '<container
117
118
118
119
Where `uuid` is a unique identifier, used to differentiate a set of backups.
119
120
120
-
**Incremental Backup**
121
+
**Incremental backup**
121
122
122
123
```sql
123
124
BACKUP DATABASE test_backups
@@ -135,19 +136,19 @@ FROM AzureBlobStorage('<AzureBlobStorage endpoint connection string>', '<contain
135
136
136
137
See: [Configuring BACKUP/RESTORE to use an S3 Endpoint](/operations/backup#configuring-backuprestore-to-use-an-azureblobstorage-endpoint) for more details.
137
138
138
-
## Backup / Restore to Google Cloud Storage (GCS) {#backup--restore-to-google-cloud-storage-gcs}
139
+
## Backup / restore to Google Cloud Storage (GCS) {#backup--restore-to-google-cloud-storage-gcs}
139
140
140
-
### Take a DB Backup {#take-a-db-backup-2}
141
+
### Take a DB backup {#take-a-db-backup-2}
141
142
142
-
**Full Backup**
143
+
**Full backup**
143
144
144
145
```sql
145
146
BACKUP DATABASE test_backups
146
147
TO S3('https://storage.googleapis.com/<bucket>/<uuid>', <hmac-key>', <hmac-secret>)
147
148
```
148
149
Where `uuid` is a unique identifier, used to differentiate a set of backups.
FROM S3('https://storage.googleapis.com/test_gcs_backups/<uuid>', 'key', 'secret')
164
165
```
166
+
167
+
# Granular backups {#granular-backups}
168
+
169
+
The `BACKUP` command also works with granular backups of specific tables. Example AWS commands for backing up a specific table are listed below. GCP and Azure commands are similar to the ones explained above, except that they need to be customized to backup specific tables.
170
+
171
+
### Take a granular backup {#take-a-granular-backup}
172
+
173
+
**Full Backup**
174
+
```sql
175
+
BACKUP TABLE data TO S3('https://testchbackups.s3.amazonaws.com/backups/<uuid>', '<key id>', '<key
176
+
secret>')
177
+
```
178
+
179
+
**Incremental backup**
180
+
181
+
```sql
182
+
BACKUP TABLE data TO S3('https://testchbackups.s3.amazonaws.com/backups/my_incremental/', '<key id>', '<key
0 commit comments