Here is a hacky way to load dumps directly from the source server, without fully copying them over and extracting them first.
It may break horribly for you. This is the dark side of the force.
sudo apt-get install pv
/mnt/dumps/my_project.dump.bz2
in the example below.ls -l
). In our case, it's 1234567890
.SECRET
below.my_project_development
.That will:
cat
), which sends it to you via SSH,pv
to show a progress bar (pv just sends the input stream back out again),mysql
.Your output will be something like this:
1,63GB 17:14:40 [ 192kB/s] [==============================================> ] 81% ETA 3:49:30
Please note that this probably breaks if you do not use the same encoding on your machine, the remote machine, in your database, and when building the dump. If you can, you should always prefer using mysqldump -r
and SOURCE
.