Backups and Restic
Backups are crucial, even if you rely on cloud storage solutions. Many people mistakenly believe that Dropbox or iCloud can never lose user data. It’s not true at all, those things happen all the time. If you have anything of value, you should back it up from time to time. Cloud is not enough, you should have a real physical copy, just in case something goes wrong.
I’ve tried many backup solutions and none of them worked well enough for my needs. Finally, I’ve found a decent backup tool: Restic. It’s fast, secure, it’s written in a decent language (Go), and it also supports cheap S3 cold storage.
My backup routine looks like this:
- A dedicated backup host launches a backup job once a day.
- Backup job pulls new data form every server containing valuable data via
- Then it adds those new changes to a Restic repository.
- After that, it sends those changes offsite via S3.
With such a setup, my data always exists in at least three places:
- On production servers.
- On backup host.
Restic also encrypts the data before sending it offsite so there are no privacy issues with sending my backups to a data center. Having offsite copy is important, because things like fires and natural disasters can easily destroy all your copies if you keep them in a single physical location.