-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Backup and restore #12
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
killing
reviewed
Jan 20, 2025
If you have a lot of data, copying the whole data directory would take long. You can use rsync to do incremental backup. | ||
``` | ||
rsync -az /opt/seasearch /backup/data/ | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
有两个问题:
- boltdb 应该也是用内存映射的方式实现的,所以文件的表面大小和实际大小可能相差很远。你在本地测试一下是否有这个现象。就是文件看起来有好几 GB 大,但是 du 看的话,实际磁盘大小很小。
- rsync 对于 boltdb 这样的文件,复制效果是怎样的?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 本地测试了一下,ls -lh 的大小和 du -sh 的大小是一致的,包括在 dev 服务器也是如此
- rsync 应该是检测文件大小和时间戳来判断是否增量复制,对于 boltdb 文件,应该是会进行全量复制
killing
reviewed
Jan 20, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.