Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement