This commit is contained in:
skylar 2023-05-31 17:48:59 -05:00
commit af954eda2a

8
database-cleanup.sh Normal file
View File

@ -0,0 +1,8 @@
#!/bin/bash
cd /opt/pleroma
systemctl stop pleroma
sudo -Hu pleroma MIX_ENV=prod mix pleroma.database prune_objects
sudo -Hu pleroma MIX_ENV=prod mix pleroma.database vacuum full
sudo -Hu postgres vacuumdb --all --analyze-in-stages
systemctl start pleroma
sudo -Hu postgres pg_repack -a -j 3