[OPENDJ-6514] Backup tool with backUpAll option should warn when skipping disabled backends Created: 06/Aug/19  Updated: 29/Sep/20  Resolved: 29/Sep/20

Status: Done
Project: OpenDJ
Component/s: backends, tools
Affects Version/s: 6.5.0
Fix Version/s: 7.0.0

Type: Improvement Priority: Major
Reporter: Cyril Quinton Assignee: Cyril Quinton
Resolution: Cannot Reproduce Votes: 0
Labels: None

Story Points: 0.5
Dev Assignee: Cyril Quinton

 Description   

backup tool with the backUpAll option silently skips disabled backends.
It would be better if the tool displayed a warning mentionning the backends being skipped.



 Comments   
Comment by Cyril Quinton [ 09/Aug/19 ]

Fixed, now backup with --backUpAll option shows a warning when a backend won't be backed-up because it is disabled:

"Skipping backend "<backend ID>" because it is disabled"

Comment by Cyril Quinton [ 09/Aug/19 ]

I've made a typo in the related commit title so the corresponding pull request won't appear on this Jira issue.
Here is the commit: https://stash.forgerock.org/projects/OPENDJ/repos/opendj/commits/4bc351ad1fe76d0d5204fb2d6ad755b5dd4ff0d9

Comment by Michal Severin [ 26/Aug/19 ]

Hi Cyril Quinton, I've noticed minor issue.

I have a backend 'appdata' that is disabled. When I try to backup it using -backUpAll and online set to True, there is `Skipping backend 'appData' because it is disabled` in the stdout. But when I try to backup it using -backUpAll and online set to False, then `Skipping backend 'appData' because it is disabled` is in stderr.

In both cases command returned 0

Comment by Cyril Quinton [ 26/Aug/19 ]

Hi Michal Severin, thanks for the feedback, witch one do you think is the correct behavior? Printing `Skipping backend 'appData' because it is disabled` in stderr or stdout?
I would go for stdout because it is just a warning and backup will continue backing up the other backends. 
In either case, I should reopen the issue to have a consistent behavior between online and offline.

Comment by Jean-Noël Rouvignac [ 26/Aug/19 ]

We should always follow https://stash.forgerock.org/projects/OPENDJ/repos/opendj/browse/docs/architecture/tools.md:

Standard output and error usage

  • Tool MUST print the results of expected behavior stdout
  • Tool MUST print the results of unexpected behavior, such as errors, to stderr

I would say this is not expected, thus we should use stderr?

Comment by Michal Severin [ 26/Aug/19 ]

I think that it should be in stdout. Its not an error, just a warning and RC is 0 so stderr should be empty.

Comment by Cyril Quinton [ 26/Aug/19 ]

I would say this is expected, when backing up all the backend it is quite possible that one of the backends is disabled. So I agree with Michal, a warning on stdout should be good.

Comment by Cyril Quinton [ 26/Aug/19 ]

Reopenning the issue because the offline warning should be on stdout.

Comment by Cedric Tran-Xuan [ 28/Jul/20 ]

Note: with the latest dsbackup command, there are no more warnings for disabled backends.

Comment by Cyril Quinton [ 29/Sep/20 ]

Closing this issue because, I Cedric Tran-Xuan said, the new dsbackup tool does not warn the user when skipping disabled backends.

Generated at Mon Nov 30 13:40:04 UTC 2020 using Jira 7.13.12#713012-sha1:6e07c38070d5191bbf7353952ed38f111754533a.