• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Mysql data retrieving

 
ashish chakkara
Greenhorn
Posts: 10
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I accidently updated my Mysql db with previous backup(which is 1 week old) just now.So i can't find the data entered yesterday.
Is there any way to get the db upto yesterday?

Please help me

Ashish
 
Jeff Verdegan
Bartender
Posts: 6109
6
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Was your backup in the form of SQL statements to execute? Or did you just replace the data files with the older versions?

If it was done by SQL statements, then you may still have a transaction log around that you can use. I don't know the details, or even if you'll be able to fix it, but you could google for something like mysql transaction log or mysql recovery or something like that.

 
ashish chakkara
Greenhorn
Posts: 10
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jeff,

Thank you,

Actually my back is a .sql file which was taken by mysqldump command(mysqldump -u username -pPASSWORD pPASSWORD >/mnt/abc_23oct2012.sql)
This was done 1 week ago.Today i accidently run the command mysql -u username -pPASSWORD pPASSWORD < /mnt/abc_23oct2012.sql
So what happend is that i lost i week data from my db.So what should i do to recover the lost data? please help me...


Thanks
Ashish
 
Campbell Ritchie
Sheriff
Posts: 51349
87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have already been given suggestions. What happened when you followed them?
I think this discussion would sit better in our databases fora: moving.
 
Kemal Sokolovic
Bartender
Posts: 825
5
Java Python Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OP, try what other(s) already suggested. But I wouldn't be optimistic about retreiving old data since you didn't create a backup before you updated database. Since autocommit is enabled by default (source) all (create, update, delete) statements are commited as soon as they completed successfully, so I suppose there is no way to do a rollback.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic