Ask HN: What is your startup's backup policy?
How often do you backup?
Is it automated or manual?
Do you run your own script, or use some opensource/paid solution?
Do you encrypt your backup data?
Which files do you backup? DB? source? images?
How many and which sources do you backup to?
36 comments
[ 5.1 ms ] story [ 143 ms ] threadWe also do more frequent backups to an internal server during the day.
Our code is in SVN, which is also backed up to S3.
We have scripts that take a vanilla etch build and prepare it for production. That way we don't have to worry about backing up the OS.
There are at least 5 accessible copies of my source code at any moment, for example: my laptop, my server (source control), my server's backup from yesterday, my server's backup from a week ago, and my per-release In Case Shit Happens tarball chilling on a Google server farm somewhere.
Which means if my apartment burned down on the same day that Slicehost's colo facility got hit by a meteor, I would still have a copy left.
Customer records? Important but not as important as source code. I have five redundant copies of every transaction: one at the payment processor, one at e-junkie.com, and 3 in my database and its backups.
Email? Much less important to me. I pay Google to worry about it and assume they will be competent.
Analytics data? Nice to have, wouldn't cry too much if I lost it all tomorrow. Mine gets backed up as a side effect of backing up the other stuff. Google Analytics and Clicky also keep historical data for me, and I rely on them to make sure it doesn't vanish.
None of this is encrypted (except to the extent my service providers do it -- Paypal certainly does, for example). I don't store customer billing information, so the most sensitive data I have is a list of names. (Source code? Pfft. Very little of my business value is in the source code.)
Many of the first backup scripts and libraries didn't use this corruption detection feature.
so there are at least 2 copies (colo and desktop) ... and dvd
i do still tar on structural disruptions (jquery update, openbsd upgrade, data structure change, etc)
that's per site, every morning, semi-automatic (i still prefer to ssh and then manually hg update shrug)
regular mysql dumps are taken from all databases on all servers every so often in case the rsync'd mysql binary files won't restore.
We call it from crontab to run once a day with the following:
java -jar s3backup.jar /etc/iptables-save /etc/lighttpd/lighttpd.conf ...
You just list out which files you wanted backed up, and then they show up in your bucket as: yyyyMMddHHmmssZ-filename
Code is here: http://3banana.com/pics/S3Backup.java
You need Amazon's Java S3 libary which you can snag from here: http://developer.amazonwebservices.com/connect/entry.jspa?ex...
If you want to toss it into a JAR and simplify startup use the following META-INF/MANIFEST.MF
New version is up. Also includes the unit test that should have been there in the first place. grumble
http://3banana.com/pics/S3BackupTest.java
Desktop: Time Machine (hourly; automated)
All code is hosted at GitHub; I just sort of assume the EngineYard people know how to back stuff up. Google for e-mail, though it is locally mirrored via IMAP.
MogileFS: real-time encrypted backup to S3 (in addition to multiple local copies). This covers all of our blob-like data, keeps MySQL relatively small.
Systems: logs nightly synced to S3, otherwise no data to back up. One puppet script away from reconstruction.
Email: local server rsync in addition to procmail failsafe copies.
Code: svn master encrypted and sent to S3 nightly.
We use boto to access Amazon services.
we backup nightly (we backup at the "quietest" period of last nights activity on the subsequent night)
on our local machine we can keep: yesterdays backup, day before yesterday, end of last week, and start of month backups.
it's entirely automated, except for the bi-monthly backup check (I CANNOT STRESS THIS ENOUGH - CHECK BACKUPS!) where we fully restore our data and code on a spare box.
by code i mean live code - we also backup our git working code base.
1. how do you back up data?
2. how do you back up 'progress' (eg, code commits, releases)?
3. what is your plan B (eg, this startup failed, what do i do next)?
maybe it's just me, but verbal communication is funny.
If you are a start-up that doesn't have serious SysAdmin talent on-board, the only logical call is to outsource every machine possible. Even if you are ludicrously good hackers, you need to have a true Linux money, who isn't needed elsewhere coding, to consider not outsourcing web and email hosting. And you should back-up anything important on your personal computers to a managed box.
I really can't say how deeply I believe this. I've worked with multiple start-ups, and the minute you start trying to host your own website, do your own backups, serve your own emails - you're asking for trouble. Even if you set up everything right, just the time dealing with the computers could be better spent changing the world
Whatever you do, don't host actual email boxes in house. A telephone pole will get hit by a truck, and you will lose email for two days, and no amount of tech smarts will get you out of that. Trust me, it happens.
You can get a slice of a computer for $10 bucks a month these days from Webfaction - which comes with tech support that extends from installing PostGIS, to an optimized PostGres install, an optimized Apache static content server, and answers to tech support within the hour, even on the weekends. As soon as a machine you manage costs you an hour, you're financial decision has become a poor one.
Also, they have better security than you.
I completely agree it is something you -want- to outsource, because, exactly as you say, it's not something you want to spend time on. But you depend on your servers so completely that you become completely dependent on your provider.
What if your provider goes bankrupt? You'll have to move your server / move the data and nobody knows how it used to work. At that point you have very few options left. What if a tech decides to upgrade the kernel and the server doesn't boot anymore? Oops. In general, the linux techs aren't paid very well, are often overworked, are expected to fix problems at any point in the night and they don't particularly care about your server (no more than they care about the 100 servers next to it). Now add root access to the mix and watch what happens.
If nobody in your startup team knows how to administer a server then you're taking a risk. A big and unnecessary one.
ps: saying something like "an optimized Postgres install" makes no sense. Optimization is for specific tasks. So unless the techs know exactly what kind of queries you run they can't do much optimization. They can however, easily cripple sql performance.
We should be able to keep up this strategy because it's "just" a time tracking app (http://letsfreckle.com/) with fairly lightweight data.
I was originally worried that once we got into production, this'd cause a performance drop every time it ran, but so far it's all good.
As for our codebase, we're on github and our own 4 laptops. But thinking about it, we should have another system in place for that. looks around nervously
http://www.amazon.com/KingMax-Microsoft-Certified-Drive-Wash...
Customer data (basically, SQL data) is backed up daily, archived, and put up encrypted on Amazon S3 with the date/time appended to it. The files are tiny so we have no issue with keeping year-old ones there as the costs are minuscule.
All other things like documents, staff related items, pictures of products are stored on a single server, that uses rdiff-backup and sends it to a second drive on the same pc. rdiff-backup is very nice as we've had a few instances where we needed to fetch a file from 2 months ago that was heavily modified since. The version history helps a lot