Return apropriate error and exit code when backup file is too large
There is a backup size limit on the server side. When the backup is too large, ssbackups
client exits with 255 error code and print json to stdout
:
root@omnia: ~ # ssbackups create bigfile.bak
Password for backup:
Password for backup (again):
{"type": "ClientException", "detail": "Command << ['/usr/bin/curl', '--fail', '-X', 'POST', '-m', '10', '-H', 'Accept:application/json', '-H', 'Authorization:Token 01234DEADBEEF', '-F', 'payload=@bigfile.bak', 'https://rb.turris.cz/backups/'] >> ended with << return code = 22 >> and with output << >>.", "exit_code": -1}
Foris wrongly reports "Failed to connect to the ssbackup server."
then (see screenshot).
-
ssbackups
cli client should report some apropriate message onstderr
and return defined exit code -
Foris should report similar error message instead of general "Failed to connect..."
-
A notification message should be raised when (regular timed) backup was not finished successfully, so the user get noticed that the backups are not created periodically