I have a large mysqldump file on my server and I want to import it to my PC using FTP and it is taking forever as it is a large file.
I know there is a way to zip the contents of this file but I am not able to come-up with a precise command. What would be the best command to zip/compress a large mysqldump file?
Let's say the file name is backup.sql and it is in the folder named 'backup'.
Any help would be much much appreciated. Thank you in advance for your time.
You can try something like this:-
mysqldump -u root -p database_name | gzip > dump.gz
If your database is large, you should add this to your mysqldump
mysqldump -u root --single-transaction --quick --lock-tables=false database_name | gzip > database_name.sql.gz;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With