Mastodon: Manual backups

Prepare the folder

  1. Log in as root
  2. cd /home/mastodon
  3. mkdir backups
  4. cd backups

Making the backup

  1. Database (two steps)
    su - mastodon
    pg_dump -U mastodon mastodon_production -F t > DATE_FILENAME.tar
  2. Settings file (two steps)
    cp /home/live/.env.production /home/live/backups/DATE_.env.production
  3. Redis
    cp /var/lib/redis/dump.rdb /home/live/backups/DATE_dump.rdb

Leave a Reply

Your email address will not be published. Required fields are marked *