Clean up document on gc

This commit is contained in:
Daniel Pan 2024-11-12 15:52:29 +08:00
parent c024788b6c
commit 38d3aa1d92
2 changed files with 5 additions and 9 deletions

View File

@ -7,10 +7,14 @@
Use the following command to clear expired session records in Seahub database:
```
cd <install-path>/seafile-server-latest
cd seafile-server-latest
./seahub.sh python-env python3 seahub/manage.py clearsessions
```
!!! tip
Enter into the docker image, then go to `/opt/seafile/seafile-server-latest`
### Activity
Use the following command to clear the activity records:
@ -72,7 +76,6 @@ DELETE FROM FileHistory WHERE to_days(now()) - to_days(timestamp) > 90;
Use the following command to simultaneously clean up table records of Activity, sysadmin_extra_userloginlog, FileAudit, FileUpdate, FileHistory, PermAudit, FileTrash 90 days ago:
```
cd <install-path>/seafile-server-latest
./seahub.sh python-env python3 seahub/manage.py clean_db_records
```
@ -82,7 +85,6 @@ Since version 6.2, we offer command to clear outdated library records in Seahub
e.g. records that are not deleted after a library is deleted. This is because users can restore a deleted library, so we can't delete these records at library deleting time.
```
cd <install-path>/seafile-server-latest
./seahub.sh python-env python3 seahub/manage.py clear_invalid_repo_data
```
@ -93,7 +95,6 @@ This command has been improved in version 10.0, including:
2. Dry-run mode: if you just want to see how much invalid data can be deleted without actually deleting any data, you can use the dry-run option, e.g.
```
cd <install-path>/seafile-server-latest
./seahub.sh python-env python3 seahub/manage.py clear_invalid_repo_data --dry-run=true
```

View File

@ -129,8 +129,3 @@ A simple pattern to divide the workload among multiple GC servers is to assign l
seaf-gc.sh --id-prefix a123
```
## GC in Seafile docker container
To perform garbage collection inside the seafile docker container, you must run the `/scripts/gc.sh` script. Simply run `docker exec <whatever-your-seafile-container-is-called> /scripts/gc.sh`.