Mastodon backup with restic - takes 9+ hours

My YunoHost server

Hardware: VPS bought online
YunoHost version: 11.2.3
I have access to my server : Through SSH & through the webadmin
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no
If your request is related to an app, specify its name and version: mastodon v4.1.4~ynh1 & restic v0.12.0~ynh9

Description of my issue

Hey there! I’m not quite sure whether this fits the category, but I’ll try anyway. I run a vserver with Mastodon (among other apps) that I ran daily backups on via borg to another server, but now I switched to restic and back up everything to a hosted storage box via ssh. I noticed that backups used to take an hour or two (tops), but now with restic for the first three days it took 9 or 10 hours (just mastodon, I checked the logs, most other apps take minutes), which seems excessive. A backup of my mastodon instance runs about 50Gb atm. By comparison, my peertube instance on the same server is about 160Gb, but the daily backup is much quicker (possibly because the video storage doesn’t change that often). For now, I have taken mastodon out of the daily cycle (down to 40 minutes now) and plan to back up the app on a different schedule. Has anybody else observed behavior like this, and can I do anything to speed this up? I’m not sure why it takes so long just for Mastodon. Any hints are appreciated. Thanks!

I think the problem that restic has with Mastodon is with the public/ folder - it’s a lot of small files, which many filesystems have trouble with. If you have a busy Mastodon server it’s being written to all the time and that has an impact on system memory and processing - it was very noticeable on a VPS based instance that I set up by following the Mastodon instructions last year and it’s remarkable how it disappears if that folder is moved to cloud storage and externally cached. In the end I didn’t bother backing it up as in theory it can be restored with tootctl accounts refresh, and just backed up the postgres and redis databases.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.