Live data from Hacker News

Ask HN: How do you back up your site hosted on a VPS such as Digital Ocean?

news.ycombinator.com

81–90 of 94 posts

Re: Ask HN: How do you back up your site hosted on a VPS such as Digital Ocean?

#81

Remember to have automated restore testing that validates restores are successful and the data "freshness" is within a reasonable period of time, such as last updated record in a database. Lots of people only do a full test of their backup solution when first installing it. Without constant validation of the backup->restore pipeline, it is easy to get into a bad situation and not realize it until it is too late.

Novice here. How would you go about testing the integrity and ability to restore from the backup as part of an automated backup/restore pipeline?

Re: Ask HN: How do you back up your site hosted on a VPS such as Digital Ocean?

#82
I see a lot of people mentioning different tools, but one thing you'll discover if you need to restore in the future is that it is crucial to distinguish between your "site" and your "data".

My main site runs a complex series of workers, CGI-scripts, and deamons. I can deploy them from scratch onto a remote node via fabric & ansible.

That means that I don't need to backup the whole server "/" (although I do!). If I can setup a new instance immediately the only data that needs to be backed up is the contents of some databases, and to do that I run an offsite backup once an hour.

Re: Ask HN: How do you back up your site hosted on a VPS such as Digital Ocean?

#83
post #75

I see lots of great suggestions for backup hosts and methods, but I don't see anybody addressing encrypting said backups. I'm uncomfortable with rsync.net / Backblaze / etc having access to my data. What are some good ways to encrypt these multiple-GB backups before uploading them to a third-party backup server?

Check this https://github.com/backup/backup

That looks really nice, thanks. However, I've sworn off Ruby as installing and maintaining the whole Gems stack is such a pain. I'd rather write a shell script, or conjure up some Python.

Re: Ask HN: How do you back up your site hosted on a VPS such as Digital Ocean?

#84
post #75

Earlier quoted context omitted.

Check this https://github.com/backup/backup

That looks really nice, thanks. However, I've sworn off Ruby as installing and maintaining the whole Gems stack is such a pain. I'd rather write a shell script, or conjure up some Python.

Just to kid myself, I ran `sudo gem install backup` on my CentOS 7 desktop. The CPU has been pegged for over a minute, I have no idea what it's doing. It's not using much memory, and I'm not sure if it is making or hanging on network requests.

EDIT: After a few minutes of warming the CPU, Ruby failed but at least with an informative error message.

Re: Ask HN: How do you back up your site hosted on a VPS such as Digital Ocean?

#85
This is the same question I had [1], but just asked in "how can I outsource this cheap" instead of "how can I do this cheap". I also use docker, so I would only need to get a hosted database.

[1] https://news.ycombinator.com/item?id=12659437

Re: Ask HN: How do you back up your site hosted on a VPS such as Digital Ocean?

#86
post #70

I don't know what the OP is running OS wise but if it's any modern Unix variant it uses ZFS. And a simple ZFS send/receive would be perfect. There are tons of scripts for that and replication. If you're not using a modern Unix variant with ZFS... well there isn't a good reason why you would be.

I am amused by your subtle-ish attempts to brand Linux as "not modern".

Interesting that you chose to assume Linux there. Your words not mine. DO offers other OS options than that, which also don't have modern file systems. OpenBSD etc.

Re: Ask HN: How do you back up your site hosted on a VPS such as Digital Ocean?

#87
Backup ninja. It handles backing up to remote servers via rdiff, so I have snapshots back as far as I need them. The remote server is on another provider. As long as I have SSH login via key to the remote server enabled, ninja backup will install the dependencies on the remote server for me.

Re: Ask HN: How do you back up your site hosted on a VPS such as Digital Ocean?

#88

Backup ninja. It handles backing up to remote servers via rdiff, so I have snapshots back as far as I need them. The remote server is on another provider. As long as I have SSH login via key to the remote server enabled, ninja backup will install the dependencies on the remote server for me.

How much does something like that cost to maintain (backups mainly since I'm assuming your DO droplet is ~5$/mo)

Re: Ask HN: How do you back up your site hosted on a VPS such as Digital Ocean?

#89
post #61

Earlier quoted context omitted.

Is 20% of $10 a $1.00?That said, if you have a small application, I would pay DO to pack it up. They have global servers & imaging/snapshots. Your app would prob be good if you can get away with that kind of hosting. I do believe you can take images and snapshots and download them, so using the api, a user could prob rig up a script to make it refundant if it was mission critical

I don't think that separating your hosting and backup providers is only necessary for "mission critical" things. If you don't have at least three copies of some data, in at least two distinct physical locations/services then it doesn't exist.

I agree. However, practically speaking I was just pointing out that if cost & time are extremely important and you are bootstrapping a $10 webapp, $2 for 2mins may be the right choice for the OP and people like him, with 0-500 users.

I do agree though. If the answer to the question, "if this data disappeared, would I be more than slightly miffed?" Is not, NO! Then dumping the data offsite makes sense.

The most inportant thing (which I, and many other make the mistake of) is not only backing it up-- but testing restore time.

If you have your entire database on AWS long-term tape storage, it may not even serve utility. If you can't restore a backup in the timeframe nec, then it is essentially the same as having no backup at all

Post reply on HN