Bug 1370453

Summary: rlFileRestore does not distinguish between non-existing backup dir and no backed up files
Product: [Fedora] Fedora Reporter: Dalibor Pospíšil <dapospis>
Component: beakerlibAssignee: Dalibor Pospíšil <dapospis>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: azelinka, dapospis, jprokes, mkyral, muller
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: beakerlib-1.13-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-02-16 08:48:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Dalibor Pospíšil 2016-08-26 11:10:09 UTC
Description of problem:
If one do backup of non-existing file with --clean, the backup directory is created but no file is actually copied there. rlFileRestore then reports the same error for both.

Version-Release number of selected component (if applicable):
beakerlib-1.11-2

How reproducible:
100%

Steps to Reproduce:
1. rm -f /xxx
2. rlFileBackup -- clean /xxx
3. rlFileRestore

Actual results:
an error is reported

Expected results:
no error is reported

Comment 1 Jakub Prokes 2016-08-26 13:05:19 UTC
In my opinion there should be Warning due to backup, that inform user, no file is saved.

Comment 2 Dalibor Pospíšil 2016-08-26 13:08:49 UTC
(In reply to Jakub Prokes from comment #1)
> In my opinion there should be Warning due to backup, that inform user, no
> file is saved.

Actually there is a warning in case no --clean is used. It is feature implemented few versions back.
While using --clean it is quite expected that the file does not need to exist.