User Tools

Site Tools


docu:csheet:sysadm:db:my:restore_1table

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

docu:csheet:sysadm:db:my:restore_1table [2020/03/04 10:04]
admin created
docu:csheet:sysadm:db:my:restore_1table [2020/03/04 10:05] (current)
admin
Line 2: Line 2:
  
 \\ \\
 +You may sometimes need to restore just **one table from a database** dump in another database, this will do the job pretty well **in standard cases**.
 <code bash> <code bash>
 sed -n -e '/CREATE TABLE.*`table_users`/,/CREATE TABLE/p' thedbdumpfile.sql | tr '\n' ' ' 2>&1 | grep -oP '.*UNLOCK TABLES; sed -n -e '/CREATE TABLE.*`table_users`/,/CREATE TABLE/p' thedbdumpfile.sql | tr '\n' ' ' 2>&1 | grep -oP '.*UNLOCK TABLES;
 </code> </code>
docu/csheet/sysadm/db/my/restore_1table.1583316282.txt.gz · Last modified: 2020/03/04 10:04 by admin