Add new comment

Want to support HowtoForge? Become a subscriber!
Submitted by marchost (registered user) on Fri, 2008-10-10 13:30.

To fix the problem related with the consistency between the tables (read danielj comment), I recommend replacing those lines :

### Create dir for each databases, backup tables in individual files ###
  mkdir $BACKUP/$NOW/$db
  FILE=$BACKUP/$NOW/$db/$db.sql.gz
  echo $i; $MYSQLDUMP --add-drop-table --allow-keywords -q -c -u $MUSER -h  $MHOST -p$MPASS $db $i | $GZIP -9 > $FILE
done

### Compress all tables in one nice file to upload ###

Instead of creating a backup of individual tables, it will create individual databases backups. You can open the .sql file afterward in your favorite text editor and retreive tables data if needed.

Please do not use the comment function to ask for help! If you need help, please use our forum.
Comments will be published after administrator approval.

Reply

*
*
The content of this field is kept private and will not be shown publicly.


*

  • Images can be added to this post.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <div>
  • Lines and paragraphs break automatically.