dbTalk Databases Forums  

restore only one record from backup

comp.databases.mysql comp.databases.mysql


Discuss restore only one record from backup in the comp.databases.mysql forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
remigio
 
Posts: n/a

Default restore only one record from backup - 07-19-2011 , 06:18 AM






Hi,
I have a db with some tables:
users (main table), orders, auth, ecc. (related tables).
This morning one user, and all related records, has been deleted.
On a test computer I've restored a backup and fortunately the user deleted is present on backup.
May I restore only this user and all the related records from backup?
I can't restore the whole database because of new data entry.
Thanks

Remigio

Reply With Quote
  #2  
Old   
J.O. Aho
 
Posts: n/a

Default Re: restore only one record from backup - 07-19-2011 , 06:35 AM






remigio wrote:
Quote:
Hi,
I have a db with some tables:
users (main table), orders, auth, ecc. (related tables).
This morning one user, and all related records, has been deleted.
On a test computer I've restored a backup and fortunately the user deleted is present on backup.
May I restore only this user and all the related records from backup?
I can't restore the whole database because of new data entry.
Thanks
Create a copy of the user data into a empty using INSERT ... SELECT ...
statements, then make a mysqldump of the database which just have the user
related data with --no-create-db, then you can import that mysqldump to your
live database, just before you execute it, just check that you didn't include
drop database option.


--

//Aho

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.