I think, as it is implemented right now, the 0 exit code is a little misleading. I mean, I would like to get a 0 exit code when absolutely no problem occurred, not even a warning, so that I can send (by scripting) an email saying “backup successful”.
I just did a backup, a file was not backed up, but I still got a 0 exit code! What if it was an important file? What if 99% of files (for some reason) were not backed up? Should i always “grep” the backup output looking for signs of trouble? What if I grep for some specific text and in some future release the warning message changes? The exit codes exist to avoid this kind of problems, I think. So why not to add another exit code in case of any warning or problem during the backup?
Here is my backup output that gave me 0 exit code:
Backup for / at revision 3 completed
Files: 1278499 total, 573,580M bytes; 183 new, 70,170K bytes
File chunks: 116957 total, 573,807M bytes; 11 new, 62,841K bytes, 19,645K bytes uploaded
Metadata chunks: 92 total, 482,955K bytes; 16 new, 99,754K bytes, 28,975K bytes uploaded
All chunks: 117049 total, 574,278M bytes; 27 new, 162,596K bytes, 48,620K bytes uploaded
Total running time: 00:02:30
1 file was not included due to access errors