Posted By

renekreijveld on 12/28/10


Tagged

mysql joomla


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

beneberle


joomla dbdump


 / Published in: Other
 

This will create the perfect database dump on the shell commandline of a Joomla 1.5 website. Run this command when you're in the root of the website.

  1. #!/bin/sh
  2.  
  3. database=`grep "db = " ./configuration.php | cut -d \' -f 2`
  4. dbuser=`grep "user = " ./configuration.php | grep -v offset_user | grep -v ftp_user | grep -v smtpuser | cut -d \' -f 2`
  5. password=`grep "password = " ./configuration.php | cut -d \' -f 2`
  6.  
  7. mysqldump --skip-opt --add-drop-table --add-locks --create-options --disable-keys --lock-tables --quick --set-charset --user=$dbuser --password=$password $database > $database.sql
  8. echo $database.sql created.

Report this snippet  

You need to login to post a comment.