Robby on Rails: oops, didn't mean to rake thatthoughts.sort_by{|t| t[:topic]}.collect tag:www.robbyonrails.com,2005:TypoTypo2006-09-05T22:12:43-04:00Robby Russellurn:uuid:99ae9b4ade36ee125356ed42b27da2c22005-05-15T10:14:39-04:002006-09-05T22:12:43-04:00oops, didn't mean to rake that<p>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.
<br /><br />
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.
<br /><br />
oh well…
<br /><br />
but wait! What about my <span class="caps">RSS</span> feed? Well, my <span class="caps">RSS</span> reader has a cache of all comments and entries! So, I am working on a script to import everything back into typo. It’s <strong>almost</strong> working for all the entries. Trying to do <span class="caps">SQL</span> inserts, is being quirky… I might try to add them one-by-one through the script via the typo web service.
<br /><br />
It’s the next day and I have imported all of my entries from my <span class="caps">RSS</span> 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).
<br /><br />
Now, to fix that postgresql backup script to use the right version of pg_dump. :-)
<br /><br />
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.</p><p>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.
<br /><br />
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.
<br /><br />
oh well…
<br /><br />
but wait! What about my <span class="caps">RSS</span> feed? Well, my <span class="caps">RSS</span> reader has a cache of all comments and entries! So, I am working on a script to import everything back into typo. It’s <strong>almost</strong> working for all the entries. Trying to do <span class="caps">SQL</span> inserts, is being quirky… I might try to add them one-by-one through the script via the typo web service.
<br /><br />
It’s the next day and I have imported all of my entries from my <span class="caps">RSS</span> 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).
<br /><br />
Now, to fix that postgresql backup script to use the right version of pg_dump. :-)
<br /><br />
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.</p>