diff options
Diffstat (limited to 'docs/administration/CLI_tasks')
| -rw-r--r-- | docs/administration/CLI_tasks/database.md | 29 | ||||
| -rw-r--r-- | docs/administration/CLI_tasks/user.md | 19 | 
2 files changed, 38 insertions, 10 deletions
| diff --git a/docs/administration/CLI_tasks/database.md b/docs/administration/CLI_tasks/database.md index ff400c8ed..647f6f274 100644 --- a/docs/administration/CLI_tasks/database.md +++ b/docs/administration/CLI_tasks/database.md @@ -69,3 +69,32 @@ mix pleroma.database update_users_following_followers_counts  ```sh tab="From Source"  mix pleroma.database fix_likes_collections  ``` + +## Vacuum the database + +### Analyze + +Running an `analyze` vacuum job can improve performance by updating statistics used by the query planner. **It is safe to cancel this.** + +```sh tab="OTP" +./bin/pleroma_ctl database vacuum analyze +``` + +```sh tab="From Source" +mix pleroma.database vacuum analyze +``` + +### Full + +Running a `full` vacuum job rebuilds your entire database by reading all of the data and rewriting it into smaller +and more compact files with an optimized layout. This process will take a long time and use additional disk space as +it builds the files side-by-side the existing database files. It can make your database faster and use less disk space, +but should only be run if necessary. **It is safe to cancel this.** + +```sh tab="OTP" +./bin/pleroma_ctl database vacuum full +``` + +```sh tab="From Source" +mix pleroma.database vacuum full +```
\ No newline at end of file diff --git a/docs/administration/CLI_tasks/user.md b/docs/administration/CLI_tasks/user.md index f535dad82..afeb8d52f 100644 --- a/docs/administration/CLI_tasks/user.md +++ b/docs/administration/CLI_tasks/user.md @@ -95,33 +95,33 @@ mix pleroma.user sign_out <nickname>  ``` -## Deactivate or activate a user  +## Deactivate or activate a user  ```sh tab="OTP" - ./bin/pleroma_ctl user toggle_activated <nickname>  + ./bin/pleroma_ctl user toggle_activated <nickname>  ```  ```sh tab="From Source" -mix pleroma.user toggle_activated <nickname>  +mix pleroma.user toggle_activated <nickname>  ``` -## Unsubscribe local users from a user and deactivate the user +## Deactivate a user and unsubscribes local users from the user  ```sh tab="OTP" - ./bin/pleroma_ctl user unsubscribe NICKNAME + ./bin/pleroma_ctl user deactivate NICKNAME  ```  ```sh tab="From Source" -mix pleroma.user unsubscribe NICKNAME +mix pleroma.user deactivate NICKNAME  ``` -## Unsubscribe local users from an instance and deactivate all accounts on it +## Deactivate all accounts from an instance and unsubscribe local users on it  ```sh tab="OTP" - ./bin/pleroma_ctl user unsubscribe_all_from_instance <instance> + ./bin/pleroma_ctl user deactivate_all_from_instance <instance>  ```  ```sh tab="From Source" -mix pleroma.user unsubscribe_all_from_instance <instance> +mix pleroma.user deactivate_all_from_instance <instance>  ``` @@ -177,4 +177,3 @@ mix pleroma.user untag <nickname> <tags>  ```sh tab="From Source"  mix pleroma.user toggle_confirmed <nickname>  ``` - | 
