apache - 在 scylladb 中备份一个键空间
问题描述
我正在尝试将我的数据备份到scylladb
. 目前,我的 Scylla 在 docker 中。
所以我正在运行这个命令:
docker exec -it saif-scylla nodetool snapshot testkeyspace
Requested creating snapshot(s) for [testkeyspace] with snapshot name [1564405495089]
Snapshot directory: 1564405495089
/var/lib/scylla/data
但我在文件夹中找不到任何备份。
还有“请求”的确切含义。
此外,当我通过运行命令列出快照时:
docker exec -it saif-scylla nodetool listsnapshots
我能看到的是:
Snapshot name Keyspace name Column family name True size Size on disk
1564405495089 testkeyspace new_events 0 bytes 0 bytes
1564405495089 testkeyspace new_pings 0 bytes 0 bytes
1564405495089 testkeyspace test_pings 0 bytes 0 bytes
我不明白这里发生了什么问题。
任何想法,我做错了什么?
任何帮助都会有所帮助。
谢谢
解决方案
快照文件位于“快照”下的表目录中。例如,对于 keyspace mykeyspace 和 table heartrate_ttl,运行后nodetool snapshot mykeyspace;
ls -l /var/lib/scylla/data/mykeyspace/heartrate_ttl-75359ce0b22611e9b18b000000000000/snapshots/1564421433190/
total 44
-rw-r--r--. 2 root root 66 Jul 29 17:30 la-4-big-CompressionInfo.db
-rw-r--r--. 2 root root 189 Jul 29 17:30 la-4-big-Data.db
-rw-r--r--. 2 root root 10 Jul 29 17:30 la-4-big-Digest.sha1
-rw-r--r--. 2 root root 16 Jul 29 17:30 la-4-big-Filter.db
-rw-r--r--. 2 root root 30 Jul 29 17:30 la-4-big-Index.db
-rw-r--r--. 2 root root 54 Jul 29 17:30 la-4-big-Scylla.db
-rw-r--r--. 2 root root 4466 Jul 29 17:30 la-4-big-Statistics.db
-rw-r--r--. 2 root root 92 Jul 29 17:30 la-4-big-Summary.db
-rw-r--r--. 2 root root 101 Jul 29 17:30 la-4-big-TOC.txt
-rw-r--r--. 1 root root 38 Jul 29 17:30 manifest.json
nodetool listsnapshots 应该给你快照大小
nodetool listsnapshots
Snapshot Details:
Snapshot name Keyspace name Column family name True size Size on disk
1564421433190 mykeyspace heartrate_ttl 0 bytes 4.91 KB
我在上面的例子中使用了 Scylla 3.0.5 Docker。
会不会是这些表中没有数据?
推荐阅读
- node.js - FCM iOS:推送通知抛出无效参数
- c++ - 模板专业化与编译器优化
- machine-learning - 如何知道特征变量是否“足够好”以构建分类器
- html - 是什么导致 pre 高于reveal.js 中的代码?
- sql - 选择查询在 SQL 中的工作原理
- react-native - 如何更改反应抽屉导航器后退按钮图标?
- python - 将 groupby 的总和作为 Pandas 中具有不同值的新列
- json - 将变量放入 render() return - React Native
- sql - 将奇数文本字符串更改为日期 SQL
- file-upload - 通过 jsdelivr CDN 加载 Github 项目