How to save Marsedit posts into Dropbox

0 Flares Twitter 0 Facebook 0 LinkedIn 0 Email -- 0 Flares ×

Last week I attended VMworld, the conference organized every year in San Francisco by VMware. As usual, the conference was great: new and old friends to meet, sessions to attend, a couple of presentations I did, and lot of fun. However, on the opposide side, I had two bad moments during the week: an earthquake, and a major failure.

You probably all heard the news about a 6.1 Magnitude Earthquake that hit Northern California on 24th August. Well, I was just awake because of the jetlag, and I felt for the first time in my life such a earthquake. It was scary to say the least. However, it was not the only bad moment of the week.

On tuesday morning, I saw in my Mac some weird errors, and after some strange behaviour during some reboots, the SSD died completely:

My SSD just died

Well, ok I thought, after more than 5 years it’s time to replace my old 2009 Macbook Pro. All my data are saved somewhere in the cloud using Exchange Server or Gmail for my work and private email, while I use Dropbox and Google Drive for all my files. Or better, 99% of them as you will learn. When I bought my new shiny MacBook Air 11” (awesome machine by the way) on wednesday and started to retrieve all my data “from the cloud” after installing the different softwares, I realized MarsEdit was not protected with anything else then the local Time Machine, available only at home something like 6000 miles away from San Francisco. And the latest blog post I wrote on the plane was not saved anywhere…

I’ve always loved MarsEdit as my editor for this blog. It’s deep integration with WordPress helps me to direct publish my posts with really few edits after they are uploaded as drafts, and at the same time enjoy the nice interface while I’m writing them offline. There is really only one limit in MarsEdit, but it’s huge! It does not allow for remote backups of the drafts, nor even local backups to be honest. And I heavily remembered it when in this week I lost a post I wrote while flying to San Francisco. I know there are other solutions around like Evernote that sync your texts over the internet, but there is no direct integration into WordPress, so you end up writing into Evernote (with a worse user experience than MarsEdit) and then copy-paste everything into WordPress.

Hopefully, there is a way to workaround this limit. For linux users this solution will sound deadly stupid, but probably many Mac users are not so familiar with the command line.

The following example is made with Dropbox, but it can obviously be done with any sync&share solution available.

First, create a new folder in Dropbox like “Library”. I created it this way instead of calling it “MarsEdit” because in the future there will maybe be other programs with the same problem, and i want to collect all local redirections in one place. Once the folder is created, open “Terminal”, and run these commands:

cd ~/Library/Application\ Support/MarsEdit
mv LocalDrafts ~/Dropbox/Library/MarsEdit_LocalDrafts
ln -s ~/Dropbox/Library/MarsEdit_LocalDrafts ./LocalDrafts
mv PendingUploads ~/Dropbox/Library/MarsEdit_PendingUploads
ln -s ~/Dropbox/Library/PendingUploads ./PendingUploads


What have we done? Simply, we moved the two folders LocalDrafts and PendingUploads into Dropbox, and we then created two symbolic links so MarsEdit still thinks those folders are located in their original position; every write and read is redirected into the folders located in Dropbox. I’ve found other examples around where only the first folder is replicated; the “PendingUploads” however contains all the images added to a post and not yet uploaded to WordPress, I think is useful to preserve also this folder.

Now, everytime you save a draft in MarsEdit, you will see the Dropbox icon spinning for few seconds, and all your drafts will be save into Dropbox, and protected from any problem could occur to your Mac.

Enjoy! Meanwhile I have to rewrite that blog post I lost…