If the backup of the Fortinet/Fortigate device is failing:
...
set admin-ssh-grace-time 120
--More--
Error reading cmd output
Backup has finished
-----
SUCCEEDED: 0 FAILED: 1
The following change should be made to the configuration of the device:
config system console
set output standard
end