Recent Posts
XML | 11 sec ago
Lua | 35 sec ago
None | 36 sec ago
C++ | 49 sec ago
None | 51 sec ago
CSS | 52 sec ago
Java 5 | 1 min ago
None | 1 min ago
Delphi | 1 min ago
None | 1 min ago
Free Subdomains
Want a pastebin.com sub-domain for your community?
learn more...
What is pastebin?
Pastebin is a website that hosts all your text & code on dedicated servers for easy sharing.
learn more...
Learn a little bit about the new Pastebin.com on our help page. hide message
By fishfucker on the 25th of Jul 2007 05:51:46 PM Download | Raw | Embed | Report
  1. #!/bin/bash
  2.  
  3. user="root"
  4. pass="foobar"
  5. base="/var/www/development/sql"
  6.  
  7. function SqlDumpData {
  8.     mysqldump -u $user -p$pass --no-create-info --skip-opt --comments=0 $1 | \
  9.       egrep -v "INSERT INTO \`(accesslog|cache|search_index|sessions)\`" | sort >$2
  10. }
  11.  
  12. function SqlDumpStructure {
  13.     mysqldump -u $user -p$pass --no-data $1 >$2
  14. }
  15.  
  16. cd $base
  17.  
  18. # drupal
  19. SqlDumpData example example_data.sql
  20. SqlDumpStructure example example_structure.sql
Submit a correction or amendment below. Make A New Post
To highlight particular lines, prefix each line with @h@
Syntax highlighting:
Post expiration:
Post exposure:
Name / Title:
Email: