- #!/bin/bash
- user="root"
- pass="foobar"
- base="/var/www/development/sql"
- function SqlDumpData {
- mysqldump -u $user -p$pass --no-create-info --skip-opt --comments=0 $1 | \
- egrep -v "INSERT INTO \`(accesslog|cache|search_index|sessions)\`" | sort >$2
- }
- function SqlDumpStructure {
- mysqldump -u $user -p$pass --no-data $1 >$2
- }
- cd $base
- # drupal
- SqlDumpData example example_data.sql
- SqlDumpStructure example example_structure.sql
Posted by fishfucker on Wed 25 Jul 18:51
report abuse | download | new post
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.