rdiff-backup-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Exit code 2 confusion


From: Eric Zolf
Subject: Re: Exit code 2 confusion
Date: Thu, 15 Jun 2023 06:27:35 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]