Pleroma Commands

Some commands for Pleroma admins

pleroma

Update

git pull

sudo -Hu pleroma MIX_ENV=prod mix deps.get

sudo -Hu pleroma MIX_ENV=prod mix ecto.migrate

systemctl restart pleroma

Remove unused deps

sudo -Hu pleroma MIX_ENV=prod mix deps.clean --unused

Database vacuum

sudo -Hu pleroma MIX_ENV=prod mix pleroma.database remove_embedded_objects --vacuum

or

sudo -u pleroma -H -- psql -d pleroma_dev -c "VACUUM(FULL, ANALYSE, VERBOSE)"

Backup script provided by @sjw

#!/bin/bash DATE=$(date +"%Y%m%d%H%M") cd /media/backup/pleroma/postgres nice -n 20 pg_dump -Fc pleroma_dev > pleroma_${DATE}.bak

find /media/backup/pleroma/postgres -name "pleroma*.bak" -mtime +14 -type f -delete