To take db dump (export) use the following command. This will take the dump of the whole database
mysqldump -u user_name -p database_name > dump.sql
To take backup of specific tables you can specify the table names like
mysqldump -u user_name -p database_name table1 table2 > dump.sql
Now if you want to select some particular rows in a table u can use the following
mysqldump -u user_name -p database_name table1 --where=condition > dump.sql
To import (restore) use the following command
mysql --user=user_name --password=password database_name < dump.sql
Saturday, March 26, 2011
Friday, March 25, 2011
Restarting Mongrel Server
Switch to your app directory and run the following command
sudo mongrel_rails cluster::restart
sudo mongrel_rails cluster::restart
and you are done :)
Wednesday, March 23, 2011
Awesome Screenshot
Awesome Screenshot, an extension to capture, annotate and share awesome screenshots in Firefox 4, Chrome and Safari.
Subscribe to:
Posts (Atom)