views:

128

answers:

2

Hello,

We recently lost a database and I want to recover the data from de Production.log.

Every request is logged like this:

Processing ChamadosController#create (for XXX.XXX.XXX.40 at 2008-07-30 11:07:30) [POST] Session ID: 74c865cefa0fdd96b4e4422497b828f9 Parameters: {"commit"=>"Gravar", "action"=>"create", "funcionario"=>"6" ... (all other parameters go here).

But some stuff to post on de database were in the session. In the request I have the Session ID, and I also have all the session files from the server.

Is there anyway I can, from this Session ID, open de session file and get it's contents?

+1  A: 

Have you tried using Marshal#load? I'm not sure how you're generating those session files, but it's quite possible Rails just uses Marshal.

Jordi Bunster
A: 

Yes, that works, thanks.

But my main problem now is not getting the contents from the session file, but linking the Session ID from de log to the session file.

daniel