4

Is it possible to backup and compress just like in Linux: mysqldump --all-databases | lzma > all.sql.gz

I only have smb:// and cmd.exe access via winexe, so no GUI (remote desktop is not enabled, it requires kerberos or something), and phpmyadmin are too slow/timeout when dumping 1.2GB database.

Kokizzu
  • 1,807

1 Answers1

5

Found a solution, download any command line compression utility, for example: xz (it gives good compression ration: from 1.2GB database size to just 100MB), put it on mysql directory using smb://, then run cmd.exe, change directory to the mysql directory using cd, then execute:

mysqldump -u user -p --all-databases | xz > all.sql.xz

then just copy the 100MB backup file to Linux box via smb://

EDIT: actually it's >2GB when exported to .sql, so I do really need the compression:

$ xz --list mysql-all_20141128_2012.sql.xz 
Strms  Blocks   Compressed Uncompressed  Ratio  Check   Filename
    1       1     96.2 MiB  2,297.7 MiB  0.042  CRC64   mysql-all_20141128_2012.sql.xz
Kokizzu
  • 1,807