title: Rails: Moving from Active Record Session Store to a Redis Store
body: <p>I have a large application that as many, many thousand active sessions. I want to migrate into a Redis session store using <a href="https://github.com/jodosha/redis-store/tree/master/redis-rails" rel="nofollow">this</a>. And ideally, I want my current sessions to stay active. </p>
  
  <p>Does anyone have any experience in migrating active sessions. I assume I write either a migration or a rake task (I think migration, so I can drop the old table as part of this), and I want to just write into redis all the current details. </p>
  
  <pre><code>old_sessions = ActiveRecord::Base.connection.select_all("select * from sessions")
  old_sessions.each { |session| $redis.set(????? ????) }
  </code></pre>
  
  <p>But I am worried about data integrity. </p>