Retrospring is shutting down on 1st March, 2025 Read more

Anonymous Creature · 1y

hello - may i ask how you go about backing up your instance? and in general i'd love to hear if you have any fedi admin advice, too. i've been trying to figure out a tiny personal instance and while everything seems stable right now and i have a manual backup i'm a little afraid of messing something up.. óωò

I've been using the yunohost command to back up the glitchsoc app regularly. I made a .sh file that I run as a cron job every night at midnight, and then I have a script on my computer that downloads a copy of the most recent backup from it. You can also store it on an external web host. It's best to have multiple copies in different places to prepare for the worst case scenario.

The official mastodon documentation outlines what you need to save, but it doesn't say exactly what commands to run. As long as you are successfully copying these files to somewhere else, and you keep the last 3 backups before deleting any, you're doing great.

https://docs.joinmastodon.org/admin/backups/

Here's a guy who posted the script they use, they upload their backups to amazon.

https://nutcroft.com/blog/how-to-backup-a-mastodon-instance/

Their script dumps the database with pg_dump as the mastodon user and uses tar to compress it + the media/other files. It then uses a command specific to amazon to upload the files onto their cloud.

As for fedi admin advice i have a wall of text 4 u:
1. Try not to get too worried about getting defederated by other instances. some servers will defed for literally any reason and not say why. some admins treats their instances blocklist like its their own personal blocklist

  1. I can't say for other software, but mastodon hasn't had any devastating problems despite me messing with it. I've only ever had it break after I'd tried to make changes to the theme incorrectly. As long as you aren't dicking around inside the database or deleting random files in the live folder you should be good lol. I haven't had to do any other unplanned maintenance other than update the software when a new feature I want comes out.

  2. Actually one bit of maintenance you might want to do is clear the profile cache. In the masto web admin panel you can do basically everything you need to, but the content retention options don't automatically clear out avatars and headers. They ended up taking up like 30 GB of space on the old mastodon before I realized. I do this with the command RAILS_ENV=production bin/tootctl media remove --prune-profiles. To do this you'll need to be cd'd into your mastodon installation folder (for me its /var/www/glitchsoc/live). This will delete avatars and headers from other servers that aren't followed by anyone on the instance.

  3. If all of that is nonsense, I'd suggest try flipping through the documentation for your software to be familiar with what its command line tools can do. Also just do it anyway, you might learn something you didn't know you wanted.

Retrospring uses Markdown for formatting

*italic text* for italic text

**bold text** for bold text

[link](https://example.com) for link