A Little Noise


Restore from mysqldump --all-databases in parallel

csplit backup.sql /"^-- Current Database"/ {*}; for f in xx*; do cat xx00 "$f" | mysql& done;

and then rm xx* when the background jobs have finished.

I haven't done any benchmarking, and I haven't worked out what to do if the number of databases exceeds the number of available connections.

Filed under: MySQL Leave a comment
Comments (1) Trackbacks (0)
  1. It is unlikely that you want to have so many connections running that the instance would hit max_connections. I suggest reading the notes pgrestore’s -j option ( http://www.postgresql.org/docs/8.4/static/app-pgrestore.html )

    Have you considered mk-parallel-dump and mk-parallel-restore ?

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

No trackbacks yet.