I save my partition rapberry on a USB key to help control such as the:
$this->bbcode_second_pass_code('', 'dd if = / dev / mmcblk0p1 | gzip -9> /mnt/backup/rpi/raspberry-$DATE-mmcblk0p1.img.gz')
And I can not get the output of the command, I have always in my terminal the result of both dd command:
$this->bbcode_second_pass_code('', '204800 + 0 records read
204800 + 0 records written
104857600 bytes (105 MB, 100 MiB) copied, 167.834 s, 625 kB / s
...
')
I ask because I run the task in a cron with sending email to confirm the backup. It's more comfortable to know the size of gzip ..

For information here is what it looks like the script
I executes with a call in cron:
$this->bbcode_second_pass_code('', '00 01 * * * / 2 / bin / bash /root/backup.sh> /home/lolop/backup.log')
I have only the output of rsync.