GreptimeDB 元信息导出和导入工具
本指南描述了如何使用 GreptimeDB 的元信息导出和导入工具进行元数据库备份和恢复。
有关详细的命令行选项和高级配置,请参阅 元数据导出和导入。
概述
导出操作
导出到 S3 云存储
将元数据从 PostgreSQL 导出到 S3 云存储,用于云备份存储:
greptime cli meta snapshot save \
--store-addrs 'password=password dbname=postgres user=postgres host=localhost port=5432' \
--backend postgres-store \
--s3 \
--s3-bucket your-bucket-name \
--s3-region ap-southeast-1 \
--s3-access-key-id <your-s3-access-key-id> \
--s3-secret-access-key <your-s3-secret-access-key>
输出: 在指定的 S3 桶中创建 metadata_snapshot.metadata.fb 文件。
导出到本地目录
从 PostgreSQL 后端导 出
将元数据从 PostgreSQL 导出到本地目录:
greptime cli meta snapshot save \
--store-addrs 'password=password dbname=postgres user=postgres host=localhost port=5432' \
--backend postgres-store