I used this script for years on my VPS. And it\'s still working.
DBLIST=`mysql -uroot -pROOT_PASSWORD -ANe\"SELECT GROUP_CONCAT(schema_name) FROM information
Errno 32 is "broken pipe" so any error that is happening with the pipe destination (in this case gzip) will cause errno 32. If the directory structure has changed and your ${BACKUP_DEST}
no longer refers to a directory that exists this problem would occur.
I would debug this by piping something else to your gzip command or creating an uncompressed backup not involving gzip.
I was surprised I couldn't do a dump of my DB, I was able to do it the day before. Now, I was getting this error.
As nos said, the error message means Broken pipe, which means the output cannot be written to disk. In my case, my SSH user had no permission to write in the folder I was targeting in my mysqldump instruction.
You can output your dump in your /home/your_user directory to see it you still get the same error. Doing so solved my problem.
I had the same problem due to a couple of typos.
I typed the name of the db user incorrectly. I had "db_user_1"
when he was really "db_user1"
.
After the pipe I forgot the >
in gzip > myfile.tar.gz
.
But I recommend you upgrade to MySQL 5.6+ asap, so you can stop exposing database passwords other users.
Check out this answer on StackOverflow.
Make sure the folder /home/backup/db/ (which your are using to store the backup) has write access permission (to quick check: try using chmod -R 777 on that folder and run the script to make sure).
What helped me with this problem is
export LANG=C
prior to running mysqldump per https://github.com/netz98/n98-magerun/issues/771