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

NBU: exclude '/usr/openv/netbackup/logs' directory instead of files in directory only #2132

Merged
merged 1 commit into from May 2, 2019

Conversation

rmetrich
Copy link
Contributor

Relax-and-Recover (ReaR) Pull Request Template

Please fill in the following items before submitting a new pull request:

Pull Request Details:
  • Type: Bug Fix

  • Impact: Normal

  • How was this pull request tested? Tested on RHEL7

  • Brief description of the changes in this pull request:

When using the NetBackup method, the files in the logs directory are excluded because they are useless. However, if, for some reason /usr/openv/netbackup/logs is a symlink to some other directory (a user customization), then ReaR will fail to create the ISO, due to having a skeleton directory for NBU in ReaR, causing the 'tar | untar' of COPY_AS_IS items to fail.

…n directory only

When using the NetBackup method, the files in the logs directory are
excluded because they are useless. However, if, for some reason
/usr/openv/netbackup/logs is a symlink to some other directory (a user
customization), then ReaR will fail to create the ISO, due to having a
skeleton directory for NBU in ReaR, causing the 'tar | untar' of
COPY_AS_IS items to fail.

Signed-off-by: Renaud Métrich <rmetrich@redhat.com>
@rmetrich
Copy link
Contributor Author

Hello @rear/contributors , this issue was encountered by a Red Hat customer due to him having moved the netbackup log directory to some other place.
I found out this issue is in fact wider and may affect other components as well, even though it is quite unlikely to happen in normal situations.
For example, using the following configuration file and scenario, the ISO creation will die:

  • Configuration file

    COPY_AS_IS+=( /etc/scripts )
    
  • Scenario

    # ln -s /var/log /etc/scripts
    # rear mkrescue
    
  • Output

    tar: Removing leading `/' from member names
    tar: Removing leading `/' from hard link targets
    tar: etc/scripts: Cannot open: File exists
    tar: Exiting with failure status due to previous errors
    

Copy link
Member

@jsmeix jsmeix left a comment

Choose a reason for hiding this comment

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

I know nothing about NBU so feel free to merge it when it works for you.

@jsmeix jsmeix added the bug The code does not do what it is meant to do label Apr 30, 2019
@jsmeix jsmeix requested a review from gdha April 30, 2019 14:03
@jsmeix
Copy link
Member

jsmeix commented Apr 30, 2019

@gdha
should we have that in ReaR 2.5?
I would say yes.

@gdha gdha added this to the ReaR v2.5 milestone May 1, 2019
@gdha
Copy link
Member

gdha commented May 1, 2019

@rmetrich Feel free to merge it as I just approved the PR (and @jsmeix did the same). It may be included in the 2.5 release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The code does not do what it is meant to do fixed / solved / done
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants