Recover Your Local Octopress Repository

Here I'll show you how to recover or restore your local octopress
repository, for instance you're on a new machine, or just lost your
local copy of it.

It requries you to have a repository on github that you've deployed your
octopress posts.

First I recommend that you read this post: Clone Your Octopress to Blog From Two Places, the Recreating a local Octopress repository section.

And here is what worked for me, please replace kinopyo with your user
name.

git clone -b source [email protected]:kinopyo/kinopyo.github.com.git octopress
cd octopress

gem install bundler
bundle install

rake preview
open http://localhost:4000

Tips on Converting HTML to Markdown

Somehow the latest 3 posts are still missing after I git cloned my
remote repository. I checked in advance and saved those copies as html.
And after I restored my octopress repository I used Pandoc to convert those html to markdown.

It works like:

pandoc -f html -t markdown your_html_file.html

Thoughts on Disaster

p.s. I stored my blog octopress repository on Dropbox and somehow it
just all gone, it really shocked me. Probably it was my fault not
theirs, but still I always thought Dropbox is a safe place, but I don't
even have a clue why it happended and somehow could't see the history and
restore from their website. After I noticed it everytime I came up with
something to write I've had used it as an excuse, or maybe I was not in
the mood to deal with it(also I didn't know how...).

So I need a fallback solution about Dropbox, every disaster changes you to rethink
about current seems comfortable situation. And hope I'll write more often :)

March 01, 2014 octopress

Share on Twitter Share
Qihuan Piao

Qihuan Piao

(aka kinopyo) is Chinese based in Tokyo. Software writer. He shares stories inspired him in this blog. His infamous line - "I feel calm when I kill those monsters, or people (in game)" shocks his friends deeply.
He also writes in Japanese and Chinese.