I have the following command (simplified):
mysqldump <databases> | bzip2 > backupfile.sql.bz2
For some reason the bzip2 process went crazy and took the CPU load up to 60. I don't know why, but I am hoping that using nice might mitigate it in the future, but I only want nice on bzip2, not mysqldump.
Can I just change it to
mysqldump <databases> | nice bzip2 > backupfile.sql.bz2
or do I have to do
nice mysqldump <databases> | bzip2 > backupfile.sql.bz2
Thanks