6 ms·
How to lose and recover your blog in 30 minutes
- aidos 13y agoIt'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.
- dice 13y agoIf 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.
- bsg75 13y agoDogfooding his own project I would assume.
- fsckin 13y agoDamn... 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.
- HorizonXP 13y agoAnd 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?
- zemo 13y agothis is the blog of the guy that wrote Redis.
- oinksoft 13y agoAgreed, 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.
- kijin 13y ago> 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.
- chc 13y ago> 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?
- autotravis 13y agobecause `./build.py; rsync -r site/ site.com:~/site/` is easy?
- deleted 13y ago[deleted]
- onli 13y agoBecause "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.
- swah 13y agoWhy? 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.
- qznc 13y ago"oh, static systems are for people that don't have fast databases ;-)" -- antirez (article author) https://twitter.com/antirez/status/407184116275503104 https://twitter.com/antirez/status/407184116275503104
- manuelflara 13y agoFunnily 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 :)
- deleted 13y ago[deleted]
- agentile 13y agoSo really ... google cache to the rescue...
- markwakeford 13y agoPretty 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
- hackula1 13y agoI 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 http://morganherlocker.com/post/badblog
- grecy 13y agommm. 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.
- hackula1 13y agoI 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. :)
- etler 13y agoWhat 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.
- kijin 13y agoThe 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 https://web.archive.org/web/*/http://antirez.com
- antirez 13y agoThat is helpful, thanks! I'll recover the dates...
- lamby 13y agoSo those distro packages are looking quite appealing after all...
- jheriko 13y ago"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...
- borplk 13y agoI'm surprised he isn't using a static website
- auxbuss 13y agoSalvatore (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 https://twitter.com/antirez/status/407184116275503104
- qznc 13y agoMy database is called ext4. It is plenty fast for a blog. :-)
- username42 13y agoI love his conclusion "Without to mention that now I know I don't have to enable backups as I can recovery everything."