34 ms·
Ask HN: How to stop a hacker from deleting your off-site backups?
I'm trying to come up with a half-decent backup strategy for a web server.
The strategy so far is to store backups locally on the server and have a cron job copy the latest backups over to an Amazon S3 bucket daily.
To do this, Amazon S3 user credentials would be stored on the web server.
If the web server gets hacked, the hacker would have access to the web server and the Amazon S3 credentials. With this they could delete all local and off-site backups.
Anyone got a good way of keeping backups on S3 and protecting themselves from this scenario?
- wwortiz 16y agoMaybe look here: http://www.tarsnap.com/security.html http://www.tarsnap.com/security.html it looks like you can create keys to only write and maybe keep decrypting keys offsite for just this situation.
- eliot_sykes 16y agoYep, certainly seems that way: "...this makes it possible to set up a system to automatically store archives daily (e.g., via a cron job) while not being able to read those archives back or delete them — ensuring that even if someone breaks into the system and does his best to delete everything, your data will still be safe."
- cperciva 16y agokeep decrypting keys offsite Yes, you can do that with Tarsnap. More importantly, Tarsnap also allows you to keep deletion keys offsite.
- wwortiz 16y agoI like your service I just didn't really explain my comment well :/
- eru 16y agoPerhaps you can go from a push-system to a pull-system for the backups?
- eliot_sykes 16y agoI might go this route, although I'm trying to avoid introducing another system to be maintained. Would be good if Amazon S3 could do the pulls.
- oomkiller 16y agoSetup pull backups. Rsync.net does this for me. How it works is they ssh into your box using an SSH key and pull down the backups. That way the password is never stored on the box that is being backed up.
- cperciva 16y agoPeople who care about security generally don't want to give strangers either (a) SSH access to their servers, or (b) unencrypted access to all of their data.
- eliot_sykes 16y agoI looked for this feature in their support docs and FAQ but couldn't find it - how do you set it up and specify the backup schedule?