Gentoo Blog

The ultimate Gentoo Blog
  • Home
  • About

Mount a Linux NFS Share on Windows 7

Simon | August 2, 2011

First you need to install the windows nfs client. Go to

Control Panel\All Control Panel Items\Programs and Features

Then click on Turn Windows features on or off then select NFS Services Client for NFS. After the installation start a dos box or power shell. And enter the following command to mount the share backup on server 192.168.1.1 and assign the drive letter k:

mount \\192.168.1.1\backup k:

Example: mount [options] \\nfs-server-unc-name\share-name [drive letter]

Share on Facebook
Comments
No Comments »
Categories
Gentoo, Ubuntu/Debian
Comments rss Comments rss
Trackback Trackback

Extracting a Database From a mysqldump File

Simon | August 2, 2011

Restoring a single database from a full dump is pretty easy, using the mysql command line client’s –one-database option:

mysql -u root -p --one-database db_to_restore < fulldump.sql

But what if you don’t want to restore the database, you just want to extract it out of the dump file? Well, that happens to be easy as well, thanks to the magic of sed:

sed -n '/^-- Current Database: `test`/,/^-- Current Database: `/p' fulldump.sql > test.sql

You just need to change “test” to be the name of the database you want extracted. Or you can use this shell script:

Download mysqldumpsplitter

Usage:

$>sh MyDumpSplitter.sh
Usage: sh MyDumpSplitter.sh DUMP-FILE-NAME — Extract all tables as a separate file from dump.
sh MyDumpSplitter.sh DUMP-FILE-NAME TABLE-NAME — Extract single table from dump.
sh MyDumpSplitter.sh DUMP-FILE-NAME -S TABLE-NAME-REGEXP – Extract tables from dump for specified regular expression.

Further instructions for using this script can be found here:

Mysql dump-shell script

Share on Facebook
Comments
No Comments »
Categories
Gentoo, mysql, Ubuntu/Debian
Comments rss Comments rss
Trackback Trackback

 

August 2011
M T W T F S S
« Jul   Oct »
1234567
891011121314
15161718192021
22232425262728
293031  

Categories

  • confixx/Plesk
  • fun
  • Gentoo
  • iptables
  • mysql
  • news
  • Raid Controllers
  • Stuff
  • Ubuntu/Debian
  • Xen/Vmware

Links

  • Gentoo
  • http.net
  • iphone software linux
  • michael-fuchs.net
  • Ubuntu
  • webupd8.org

Search Blog

rss Comments rss valid xhtml 1.1 design by jide powered by Wordpress get firefox