Update user guide
This commit is contained in:
parent
6384dbcd93
commit
36d356c97a
2 changed files with 48 additions and 2 deletions
|
@ -234,3 +234,49 @@ All the data generated by the server is located in the `data/` directory:
|
|||
- Uploaded media
|
||||
|
||||
Restoring is as easy as adding your backed up `data/` directory into a fresh deployment.
|
||||
|
||||
## Tasks
|
||||
|
||||
### Pruning old data
|
||||
|
||||
You should prune old data from time to time to free disk space.
|
||||
|
||||
The default retention for the inbox data is 15 days.
|
||||
|
||||
It's configurable via the `inbox_retention_days` config item in `profile.toml`:
|
||||
|
||||
```toml
|
||||
inbox_retention_days = 30
|
||||
```
|
||||
|
||||
Data owned by the server will never be deleted (at least for now), along with:
|
||||
|
||||
- bookmarked objects
|
||||
- liked objects
|
||||
- shared objects
|
||||
- inbox objects mentioning the local actor
|
||||
- objects related to local conversations (i.e. direct messages, replies)
|
||||
|
||||
For now, it's recommended to make a backup before running the task in case it deletes unwanted data.
|
||||
|
||||
You should shutdown the server before running the task.
|
||||
|
||||
#### Python edition
|
||||
|
||||
```bash
|
||||
# shutdown supervisord
|
||||
cp -r data/microblogpub.db data/microblogpub.db.bak
|
||||
poetry run inv prune-old-data
|
||||
# relaunch supervisord and ensure it works as expected
|
||||
rm data/microblogpub.db.bak
|
||||
```
|
||||
|
||||
#### Docker edition
|
||||
|
||||
```bash
|
||||
docker compose stop
|
||||
cp -r data/microblogpub.db data/microblogpub.db.bak
|
||||
make prune-old-data
|
||||
docker compose up -d
|
||||
rm data/microblogpub.db.bak
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue