adnan rafiq
adnan rafiq

Reputation: 21

mysql Dump does not write complete data into files

I have a program in which I use mysqldump on selected tables, the utility runs fine but at times the dump is not complete, i.e there are thousands of rows that exist in the original db and not in the dump file, can anyone help ?

Upvotes: 2

Views: 2401

Answers (1)

Tev
Tev

Reputation: 690

I use a database that is hundreds of thousands of records, with stored procedures and triggers, here is the mysqldump command I use for automated backups (obviously, replace the quoted values, including quotes, with your own settings):

"$MYSQL_DIR"mysqldump --no-defaults --user="$MYSQL_SERVER_USER" --password="$MYSQL_SERVER_PASSWORD" --host="$MYSQL_HOST" --skip-opt --add-locks --create-options --disable-keys --extended-insert --single-transaction --skip-master-data --quick --set-charset --flush-privileges --quote-names --triggers --routines --comments --databases --default-character-set="$DB_CHARSET" --max_allowed_packet=16M "$DB_NAME" --result-file="$DB_TO_BACKUP_PATH_TEMP" 2> "$LOG_ERROR_PATH"

Hopefully seeing what I did will help, there may be an option switch you need that you have not included...

Upvotes: 1

Related Questions