Currently I use the database backend for CodeIgniter session storage. I would like to move away from storing session information in the database, and would like to switch to using the filesystem backend. However, I would like not to lose all my sessions. Is there a way to migrate from one to the other without losing session data?
Usual way how to do this is to create transition session handler that would look first into one storage (I personally prefer the new one - filesystem) and if it won't find it there, it will look into the old one (database).
That results in a temporary state where you existing sessions will be still read from database. When they expire, new ones will be created on filesystem.
When you will be sure there are no more active sessions in database, you can switch session handler for the one that works only with filesystem.
Look at https://secure.php.net/manual/en/session.customhandler.php for more details how to implement custom handler.