commit af954eda2ac756a88bdcc54e913c4f0d675e4eba Author: skylar Date: Wed May 31 17:48:59 2023 -0500 corn job diff --git a/database-cleanup.sh b/database-cleanup.sh new file mode 100644 index 0000000..aa22d77 --- /dev/null +++ b/database-cleanup.sh @@ -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