TorryCrass.com

  • About
  • Gallery

Helpful Commands

Helpful Commands

MySQL Extract Single Database From Dump File

Here's a quick command line entry using sed to dump out a single MySQL database from a multi-database backup file.  This script assumes the DB file is comopressed with gzip. gunzip -c sqldumpfile.sql.gz | sed -n '/^– Current Database: `your_db_name`/,/^– Current Database: `/p' > your_db_name.sql  

By Torry Crass, 11 years11 years ago
Helpful Commands

List Tar File Contents

For a tar file: tar -tvf file.tar For a tar and gzip file tar -ztvf file.tgz

By Torry Crass, 11 years11 years ago

Posts navigation

Previous 1 … 3 4
Categories
  • Business (1)
  • Helpful Commands (23)
  • Notes (2)
  • Poetry (38)
  • Quips (3)
  • Scripting (6)
  • Security (19)
  • Technical (73)
  • Updates & News (9)
Valuable Products

Affordable Linode VPS

Help Others With Kiva

0.5GB Extra Storage with OneDrive

2GB Free Storage With Dropbox

 

Copyright & Image Usage
Content and images on this site are property of Torry Crass or their respective owners where cited or referenced.
Some images used through public domain licensing and obtained via http://www.publicdomainpictures.net/

© 2010 - 2018 TorryCrass.com

  • Gallery
  • NMP License v1.0
Hestia | Developed by ThemeIsle