Bug 961623

Summary: rlFileBackup --clean is not safe,
Product: [Fedora] Fedora Reporter: JianHong Yin <jiyin>
Component: beakerlibAssignee: Petr Muller <pmuller>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: asaha, dcallagh, llim, ncoghlan, ohudlick, pmuller, psplicha, qwan, rglasz, rmancy
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-05-23 11:46:36 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:
Embargoed:

Description JianHong Yin 2013-05-10 05:56:11 UTC
Description of problem:
  In rhel7
  Use rlFileBackup --clean /etc, and then restore, the system crash.

Version-Release number of selected component (if applicable):
  RHEL-7.0-20130306.0 Workstation x86_64

How reproducible:
always

Steps to Reproduce:
1. In rhel7.
2. rlFileBackup --clean /etc
3. rlFileRestore
  
Actual results:
system crash. keyboard/ping no response.

Expected results:
system normal.

Additional info:

Comment 1 JianHong Yin 2013-05-10 05:57:17 UTC
 rm -rf the cleanup file/dir is not good idea.
 It's safer that traversal all file, if no exist in backup dir then delete.

Comment 2 Petr Muller 2013-05-23 11:46:36 UTC
Not inclined to fix this. --clean performs exactly what it is documented to do:

--clean
           If this option is provided (have to be first option of the command), then
           file/dir backuped using this command (provided in next options) will be
           (resursively) removed before we will restore it.

If something is not safe to remove at all, do not call --clean on it.