Read my latest article: 8 things I look for in a Ruby on Rails app (posted Thu, 06 Jul 2017 16:59:00 GMT)

oops, didn't mean to rake that

Posted by Sun, 15 May 2005 14:14:39 GMT

I accidental caused typo to delete everything. I switched to production and it wasn’t working, ran rake and (had used the same db name) and goodbye 63 entries.

A backup! Woo… untar my pg_dump file… nothing there. Apparently, I was running the wrong version of pg_dump against the postgresql version for my typo blog. Never noticed that til now.

oh well…

but wait! What about my RSS feed? Well, my RSS reader has a cache of all comments and entries! So, I am working on a script to import everything back into typo. It’s almost working for all the entries. Trying to do SQL inserts, is being quirky… I might try to add them one-by-one through the script via the typo web service.

It’s the next day and I have imported all of my entries from my RSS reader cache file… and all my comments! What I did lose were all the email/links associated to comment posters… and they’re displaying in reverse order in the comments section… but it’s all there (from what I can tell).

Now, to fix that postgresql backup script to use the right version of pg_dump. :-)

In the end, I learned a lot about regular expressions in ruby and it’s been a fun experience…despite almost losing all my entries to date here.

Get help with your Rails project

comments powered by Disqus