8000 gossip/docs/PRUNING.md at bu5hm4nn · bu5hm4nn/gossip · GitHub
[go: up one dir, main page]

Skip to content

Latest commit

 

History

History
44 lines (27 loc) · 1.21 KB

PRUNING.md

File metadata and controls

44 lines (27 loc) · 1.21 KB

Pruning

Your database will continue to grow.

Cleaning LMDB cruft

Periodically you can compact the LMDB waste using mdb_copy -c. This is done automatically on startup from time to time, but you can do it manually.

  1. First get into your gossip directory, e.g. on linux cd ~/.local/share/gossip
  2. Make a lmdb2 directory: mkdir lmdb2
  3. Copy: mdb_copy -c lmdb lmdb2
  4. Switch to the copy: mv lmdb lmdb.old; mv lmdb2 lmdb; rm -rf ./lmdb.old

Removing unused person records

This takes a very long time and only shrinks the database by a small amount.

gossip prune_unused_people

You can break out and start again at any time. It will quickly get back to where it left off.

You can clean LMDB cruft afterwards.

Removing old events

Old events can be pruned. We don't delete your events no matter how old they are, and we also preserve entire threads that you participated in.

  1. Fire up gossip and adjust the pruning time in Settings > Storage
  2. Exit gossip
  3. Run gossip prune_old_events

You can clean LMDB cruft afterwards.

Reindexing

After doing prunes, you should rebuild indexes because the prunes do not clean out the indexes.

gossip rebuild_indices

You can clean LMDB cruft afterwards.

0