Recent outages made me realize that I've been relying too heavily on my primary Git hosting service. Right now, I only have copies on my development machine and no secondary remotes or independent repository backups. I'm considering mirroring my most important repositories, encrypting them, and storing them with an object-storage provider. How are others handling off-site backups for their repositories?
4 Answers
A self-hosted Git service on a NAS or another local machine can work well as a secondary remote, especially if it receives regular pushes and has its own backups. Just treat it as another service to maintain: keep it updated, secure it, and make sure its backups aren’t stored only on the same device.
A good automated setup is to create a bare mirror with `git clone --mirror`, update it regularly with `git remote update`, and then copy the mirror to off-site storage. A mirror preserves all branches and tags, unlike simply archiving the current working directory. Remember that issues, pull requests, and wikis usually aren’t part of the Git repository, so export those separately if they matter.
A Git clone is already a backup of the repository itself, so keeping another clone on a separate machine or hosting service is a simple approach. You can configure multiple remotes and push to both, either manually or through automation.
For important repositories, I use a 3-2-1 strategy: three copies, on two different types of storage, with one copy off-site. That could mean the working copy, a removable local drive, and encrypted cloud storage. Automating the backups matters more than choosing a particular provider, and restores should be tested periodically.

Related Questions
How To: Running Codex CLI on Windows with Azure OpenAI
Set Wordpress Featured Image Using Javascript
How To Fix PHP Random Being The Same
Why no WebP Support with Wordpress
Replace Wordpress Cron With Linux Cron
Customize Yoast Canonical URL Programmatically