Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dird: add command line feature to print specific resources #1153

Merged

Conversation

joergsteffens
Copy link
Member

@joergsteffens joergsteffens commented Apr 7, 2022

The bareos-dir prints its configuration when called with the -xc parameter.
This change allows to print only specific resources:

print full configuration

bareos-dir -xc

print all Job resources

baroes-dir -xcJob

print the Job resource BackupCatalog

bareos-dir -xcJob=BackupCatalog

While this feature might also be useful for other daemons, it can be applied to them in a later change.

Thank you for contributing to the Bareos Project!

Please check

  • Short description and the purpose of this PR is present above this paragraph
  • Your name is present in the AUTHORS file (optional)

If you have any questions or problems, please give a comment in the PR.

Helpful documentation and best practices

Checklist for the reviewer of the PR (will be processed by the Bareos team)

General
  • PR name is meaningful
  • Purpose of the PR is understood
  • Separate commit for this PR in the CHANGELOG.md, PR number referenced is same
  • Commit descriptions are understandable and well formatted
  • [ ] If backport: add original PR number and target branch at top of this file: Backport of PR#000 to bareos-2x
Source code quality
  • Source code changes are understandable
  • Variable and function names are meaningful
  • Code comments are correct (logically and spelling)
  • Required documentation changes are present and part of the PR
  • bareos-check-sources --since-merge does not report any problems
  • git status should not report modifications in the source tree after building and testing
Tests
  • Decision taken that a test is required (if not, then remove this paragraph)
  • The choice of the type of test (unit test or systemtest) is reasonable
  • Testname matches exactly what is being tested
  • On a fail, output of the test leads quickly to the origin of the fault

joergsteffens added a commit to joergsteffens/bareos that referenced this pull request Apr 7, 2022
@bruno-at-bareos bruno-at-bareos requested review from arogge and removed request for bruno-at-bareos April 11, 2022 08:01
@arogge arogge removed their request for review April 14, 2022 10:20
@alaaeddineelamri alaaeddineelamri changed the title dird: add command line feature to print resources dird: add command line feature to print specific resources Apr 20, 2022
Copy link
Contributor

@alaaeddineelamri alaaeddineelamri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your additions!

Everything is fine by me, just small details.

core/src/dird/dird.cc Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
joergsteffens added a commit to joergsteffens/bareos that referenced this pull request Apr 20, 2022
@joergsteffens joergsteffens force-pushed the dev/joergs/master/configdumponly branch from 3e2796b to a66fffb Compare April 20, 2022 08:01
joergsteffens and others added 2 commits April 21, 2022 11:39
The bareos-dir prints its configuration when called with the -xc parameter.
This change allows to print only specific resources:

  # print full configuration
  bareos-dir -xc

  # print all Job resources
  baroes-dir -xcJob

  # print the Job resource BackupCatalog
  bareos-dir -xcJob=BackupCatalog

Co-authored-by: Alaa Eddine Elamri <46047750+alaaeddineelamri@users.noreply.github.com>
@joergsteffens joergsteffens force-pushed the dev/joergs/master/configdumponly branch from a66fffb to 5d035b5 Compare April 21, 2022 09:41
@joergsteffens joergsteffens merged commit de81c92 into bareos:master Apr 21, 2022
@joergsteffens joergsteffens deleted the dev/joergs/master/configdumponly branch June 22, 2022 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants