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)
    exit
    cp /home/mastodon/live/.env.production /home/mastodon/backups/DATE_.env.production
  3. Redis
    cp /var/lib/redis/dump.rdb /home/live/backups/DATE_dump.rdb

If you wish to backup your assets like images and stuff (User-uploaded files), backup the folder named “public/system”. Keep in mind that this folder can be rather large. Actually, it can become rather massive.

Loading

Leave a Reply

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