Accidents when using rsync

I recently played around with another project and when I copied my rsync command from another project (this project right here) I didn't change the destination folder and so I ran that command and whoopsy, the whole SoaPatrick website was without content anymore. (this was Tuesday evening in case you noticed it)

Of course, my immediate reaction was FUCK. I knew I had a local backup of the whole content but that was an old one and so I looked at the details of my hosting provider to see if they do backups. They do, but doing a restore ain't free. I was already accepting the fact that my rushed playing around with rsync is going to cost me money when I took a shower and suddenly realized (still, good ideas come during showers) that my latest blog posts might still be in my RSS feed app (Reeder, still the best there is) where I could copy and paste the missing blog posts.

So I copied my local backup (with the correct rsync command) back on the server and pasted the missing blog posts from my RSS feed app and within 20 minutes the whole site was up and running again without (probably) anyone noticing it.

Now rsync is a powerful command and not something to change quickly without checking what it's actually doing before executing it. But because I'm running a flat-file CMS, restoring the whole content was such a breeze by just copying files to the server, no database hassle, I love that.