drush sql-dump with --gzip from remote to local machine I can use drush sql-dump to get the production db from my remote server and save it to my local machine no problem using:


  drush @site-live sql-dump > /home/backups/my_db_backup.sql


but i want to enable the --gzip option to make the process faster which i've tried with


  drush @site-live sql-dump --gzip > /home/backups/my_db_backup.sql.gz


but i get this error from archive manager in Ubuntu:


  gzip: /home/backups/my_db_backup.sql.gz: not in gzip format


For starters...can i actually use --gzip with sql-dump?

UPDATE: the problem appears to be that "stdin: is not a tty" is being appended to the first line of the file whether it is a plain .sql or a .sql.gz file
Here are few checks you should do:


make sure that your gzip program is in your $PATH (just check if you've gzip command),
disable any drush verbose messages to avoid printing any extra lines from  terminal which could break the compression,
temporary use -vd to check how the command look like (Executing or Backend invoke) and make sure you've --gzip in your argument list, if it's not - you're getting the plain version of it for some reason (so you can redirect to .sql file instead)


If your --gzip is not invoked, even you're specifying one and gzip is configured correctly, then it's probably a drush bug. I think this could depend on PHP version which you're using as I've the same problem with PHP 5.5.