using sed to extract single database from the dumpfile:
=========================================
sed -n '/^-- Current Database: `dbname`/,/^-- Current Database: `/p' dumpfile > dbname.sql 2>error
eg:
sed -n '/^-- Current Database: `blogs`/,/^-- Current Database: `/p' dump.sql > blogs.sql 2>error
we can also use "awk" for the same.
For extracting a particular table from a dump file, click here...
Wednesday, December 23, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment