Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
How to lose and recover your blog in 30 minutes (antirez.com)
95 points by maplebed on Dec 3, 2013 | hide | past | favorite | 30 comments


Damn... After I think I've got all the knobs set "just right", I'll always reboot just to see what happens.

This usually catches various common problems not quite as serious as this one... daemon doesn't start, kernel panics, more updates required after boot, etc.

The last time I had something like this happen, needing to restore from a weekly backup, Google or Archive.org had already cached everything new and I was able to recover it all without much hassle.


And a blog requires a Redis back-end because?

I've hosted my blog on S3 & CloudFront for a while now without issue. Comments are hosted by Disqus, and the static files are generated using Pelican.

Seriously, unless you're using your blog as a massive CMS, why not use static files?


this is the blog of the guy that wrote Redis.


Well then that's somewhat acceptable. Somewhat.


Oh, admit it. Antirez wrote a hell of a blogging platform.


"oh, static systems are for people that don't have fast databases ;-)" -- antirez (article author) https://twitter.com/antirez/status/407184116275503104


Because "comments are hosted by disqus" is just not acceptable for every blog, and every project. And if you already store comments in a database, you might as well store the entry itself.

And if you do that, you might as well build a real blog with an editor integrated. And the ability to upload images. And the ability to edit entries and comments on the blog itself. Oh, and having comments, ping- and trackbacks in the database, how about using a bayesian spamfilter?

And no, this is not a massive CMS.


Agreed, I'm moving my small website to a bash static generator right now. But I'm not so sure about hosting comments with somebody like Disqus. Better to host and moderate them yourself, or skip them altogether.

You could do a lot worse than Redis for a blog's data store though. It's simple, fast, persistent, and easy to set up.

It's weird that the author lost his blog data from a reboot. Maybe he lost his Linode? It a bummer that he didn't have a recent backup of the redis database. Recovering a blog from Google's web cache doesn't sound like fun.


> Maybe he lost his Linode? It a bummer that he didn't have a recent backup of the redis database.

He was running Redis with persistence turned off by accident. In other words, he used an in-memory database.


Why? There are mature databases, mature frameworks. Static files is pretty limited... if you mean that the blogging system wrote the static files and nginx served them, them I'd agree.


> Seriously, unless you're using your blog as a massive CMS, why not use static files?

Because regenerating the whole site all the time and manually uploading is annoying?


because `./build.py; rsync -r site/ site.com:~/site/` is easy?


The Wayback Machine has numerous caches of his website, dating back over 7 years. This should be good enough to restore all the timestamps to within 24 hours of their original values, as well as catch anything that Google's cache might have missed.

https://web.archive.org/web/*/http://antirez.com


That is helpful, thanks! I'll recover the dates...


If the comments are outsourced then why have a backend at all? Just pop all of the posts into an S3 bucket and update the index when creating a new one. No server needed.


Dogfooding his own project I would assume.


Funnily enough, just yesterday a friend of mine just told me that a few years ago the database of a blog community he runs got corrupted and had to be recovered. Unfortunately, the server where he was sending his backups got full like 3 months prior and he didn't know, so he had basically lost 3 months of data. He recovered most posts checking Google Cache too. And yes, now he has all the systems properly set up with alerts, proper backups and such :)


So really ... google cache to the rescue...


I got distracted and was looking at your other posts, when I noticed that the 5 or so I had looked at all said "1 day ago". I thought you must be a lunatic until I actually went back and read this post and saw that your dates had been lost. :)


It's funny, for all the work that goes into some things simpler is so often better. I've had a lot of value out of the content antirez has posted on his blog - all along it was just a block of unformatted text.


What I love about Jekyll and Github pages is I get all the backup that git provides. The likelyhood of me losing my hard drive data and Github losing my data at the same time are nil.


I have lost a couple blogs over the years, mostly out of laziness, letting them expire. I got an itch to write some posts recently and wanted to set up a new site. This time around I decided I would do it with something git friendly, so that I could throw it on github and forget about it if I lost interest. I wrote a "from scratch" site with this in mind and it was working well, so I open sourced the core engine today. It runs on express and is about as bare bones as it gets. http://morganherlocker.com/post/badblog


I'm surprised he isn't using a static website


Salvatore (antirez) had a nice pithy response to that:

  oh, static systems are for people that don't have fast databases ;-)
https://twitter.com/antirez/status/407184116275503104


My database is called ext4. It is plenty fast for a blog. :-)


"simple systems are really better than complex systems when something bad happens"

isn't that super ironic? that by configuring something in a stupidly elaborate way you had a problem...

redis may be super stable but cosmic ray neutrons are a thing and they will screw you one day eventually. :)

surely the real saviour here is the internet and its ability to keep crusty old data alive for you through caching and such...


Pretty fulfilling recovery ? Well done maplebed, lesson learnt and problem resolved.

My least proudest moment quote a while ago was when I realised I just binned a directory I had been writing some code in few files in it, But had them all open in an editor. Recreated the directory and hit save in each tab. phew, disaster avoided


I love his conclusion "Without to mention that now I know I don't have to enable backups as I can recovery everything."


So those distro packages are looking quite appealing after all...


mmm. I have 242 posts published on my blog, with over 3000 moderated comments. I'd rather not have to copy-paste all that back in.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: