Hi guys, Anyone has tried before a database recovery from the production.log ? Apparently, because a bug from a gem, some tables were complete deleted. I only have a backup from 3 months ago. There is no change in scheme, just new data was added. I''ve made a quick search and some people already tried a recover from log file, but it''s not clear if it worked or not. Anyone here already did this and was successful ? Is there a tool out there ? Thanks, Ernesto -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Sun, Dec 18, 2011 at 9:57 AM, Ernesto Rocha <ernestorrocha-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Anyone has tried before a database recovery from the production.log ?You might have better luck asking this on a mailing list/forum specific to whatever DB you''re using. -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org http://about.me/hassanschroeder twitter: @hassan -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Thanks, I''ll try there too. BTW, I''m using mysql. gem ''mysql2'', ''0.2.7'' rails 3.0.10 Ernesto On Sun, Dec 18, 2011 at 4:00 PM, Hassan Schroeder < hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Sun, Dec 18, 2011 at 9:57 AM, Ernesto Rocha <ernestorrocha-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: > > > Anyone has tried before a database recovery from the production.log ? > > You might have better luck asking this on a mailing list/forum specific > to whatever DB you''re using. > > -- > Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > http://about.me/hassanschroeder > twitter: @hassan > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Sun, Dec 18, 2011 at 11:22 AM, Ernesto Rocha <ernestorrocha-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I''ll try there too. BTW, I''m using mysql. > > gem ''mysql2'', ''0.2.7'' > rails 3.0.10If you''re looking for recovery options, you should probably identify the MySQL version and platform as well. Good luck, -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org http://about.me/hassanschroeder twitter: @hassan -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
One could possibly slam together a script to do this but consider what you have to work with (this will depend on your ROR version): On the version I am using the information in the production log file is the controller/method being called, the HTML verb and the parameters. The controller figures out what is fed to what model. If your app is very simple it might be feasible. You could possibly put something together using something like curl to feed the the proper requests into the server and have your app just act on them. I just did a manual recovery similarly and it a lot of time just to cover a few dozen transactions between browser and server. The lesson from this is obvious, you need backups! I have a job set up to dump my mysql database daily and forward a copy to another system periodically. Good luck Norm On 12/18/2011 10:57 AM, Ernesto Rocha wrote:> Hi guys, > > Anyone has tried before a database recovery from the production.log ? > > Apparently, because a bug from a gem, some tables were complete > deleted. I only have a backup from 3 months ago. There is no change in > scheme, just new data was added. > > I''ve made a quick search and some people already tried a recover from > log file, but it''s not clear if it worked or not. Anyone here already > did this and was successful ? Is there a tool out there ? > > > Thanks, > Ernesto > -- > You received this message because you are subscribed to the Google > Groups "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.