Re: Exit code 2 confusion
Eric Zolf <[email protected]> Thu, 15 Jun 2023 06:27:35 +0200
| Newsgroups | gmane.comp.sysutils.backup.rdiff-backup.general |
|---|---|
| Organization | Rdiff-Backup.net |
| Message-ID | <[email protected]> |
Hi, On 14/06/2023 20:05, Patrik Dufresne wrote: > Hello, > > I'm working on an automated script executing rdiff-backup v2.2 (within > Minarca). And I have some issues figuring out the various exit codes > returned by rdiff-backup. > > From the code: > > RET_CODE_OK = 0 # everything is fine > RET_CODE_ERR = 1 # some fatal error happened, the whole action failed > RET_CODE_WARN = 2 # any kind of unexpected issue without complete failure > RET_CODE_FILE_ERR = 4 # a single file (or more) failure > RET_CODE_FILE_WARN = 8 # a single file (or more) warning or difference > > 0 is great. Everything is working. Yeah ! > 1 I understand the backup failed. Good enough. > 2,4,8 I'm not sure of those. For backup. Did the backup complete ? Yes, it did but something strange happened (2 e.g. enforcing was used) _or_ some file was not backed up at all (4 e.g. because it's not readable) or had some warning (8 e.g. because some attributes couldn't be read or applied). This said, it is important to understand that it is work in progress and that the codes aren't yet everywhere implemented, especially the file related ones. > Another issue I have is exit code 2 is also used by argparse on failure. So > it's not possible to really make a distinction between the two. Ah, I didn't realize, this needs indeed to be fixed. KR, Eric > > Any clarification would be appreciated ! > > Thanks >