For the common-case risk model in the post body (SaaS user), the easy option is to set up a secondary git remote over SSH on a cheap cloud VPS. Then you can simply run git push backup-server or the like. Bonus points for setting up a cronjob to push to your backup box periodically, or to take periodic tarball snapshots of the repos on the server.
Personally though: I self-host forgejo with registration disabled, and take automated snapshots with ZFS occasionally in case I truly bork things.
all 20 comments