Skip to content
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 6 commits into from
Jan 20, 2025
Merged

Backup and restore #12

merged 6 commits into from
Jan 20, 2025

Conversation

KaniuBillows
Copy link
Contributor

No description provided.

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/
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

有两个问题:

  1. boltdb 应该也是用内存映射的方式实现的,所以文件的表面大小和实际大小可能相差很远。你在本地测试一下是否有这个现象。就是文件看起来有好几 GB 大,但是 du 看的话,实际磁盘大小很小。
  2. rsync 对于 boltdb 这样的文件,复制效果是怎样的?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. 本地测试了一下,ls -lh 的大小和 du -sh 的大小是一致的,包括在 dev 服务器也是如此
  2. rsync 应该是检测文件大小和时间戳来判断是否增量复制,对于 boltdb 文件,应该是会进行全量复制

@killing killing merged commit 9d7f5e2 into haiwen:master Jan 20, 2025
@KaniuBillows KaniuBillows deleted the backup_restore branch March 17, 2025 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants