Export snapshot files or transaction logs from a ZooKeeper instance to back up your znode data. Import snapshot files to restore or migrate data between instances.
Prerequisites
Before you begin, make sure that you have:
-
A ZooKeeper engine. For more information, see Create a ZooKeeper engine
Limits
| Feature | Requirement |
|---|---|
| Data import | ZooKeeper instance version 3.8.0.1 or later |
| Data export | Professional Edition |
Exported files are retained for seven days. After a file expires, export it again.
Export data
-
Log on to the MSE console, and select a region in the top navigation bar.
-
In the left-side navigation pane, choose Microservices Registry > Instances.
-
On the Instances page, click the name of the instance.
-
In the left-side navigation pane, choose Data Management > Znodes.
-
On the Znodes page, click Data Export.
-
In the Data Export dialog box, select a data type and click Export.
NoteThe export takes about 2 to 5 minutes. After it finishes, the file appears in the Download List section.
Data type
Description
Snapshot
Exports the latest snapshot file.
Transaction Log
Exports up to the three most recent transaction log files.
Download an exported file
After you start an export, it appears in the Download List with the following columns:
| Column | Description |
|---|---|
| File Name | Name of the exported file. |
| File Type | Snapshot or Transaction Log. |
| Exported At | Time when the export started. |
| File Size | Size of the exported file. |
| Status | Current status of the export. |
| Status | Description | Action |
|---|---|---|
| Downloadable | The export is complete. | Click Download in the Actions column. |
| Export Failed | The export failed. | Follow the error message to resolve the issue, then export again. |
| Expired | The file has passed its seven-day retention period. | Export the file again. |
Import data
The existing data in the instance is deleted after you import data. This operation is irreversible. Back up your current data before you proceed.
-
Log on to the MSE console, and select a region in the top navigation bar.
-
In the left-side navigation pane, choose Microservices Registry > Instances.
-
On the Instances page, click the name of the instance.
-
In the left-side navigation pane, choose Data Management > Znodes.
-
On the Znodes page, click Import Data.
-
In the Import Data dialog box, click Upload Local File to upload the snapshot file, and click OK.
Snapshot file size limits
The maximum snapshot file size depends on the instance specification. Use at least 3 disaster recovery nodes in production environments.
Maximum snapshot file size Minimum instance specification 200 MB 1 vCPU, 2 GiB memory 400 MB 2 vCPUs, 4 GiB memory 800 MB 4 vCPUs, 8 GiB memory 1,600 MB 8 vCPUs, 16 GiB memory 3,200 MB 16 vCPUs, 32 GiB memory