Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1958247

Summary: In case of NETFS_KEEP_OLD_BACKUP_COPY=1 and a failure happens during the backup, the old backup is removed also
Product: Red Hat Enterprise Linux 8 Reporter: Pavel Cahyna <pcahyna>
Component: rearAssignee: Pavel Cahyna <pcahyna>
Status: CLOSED ERRATA QA Contact: David Jež <djez>
Severity: high Docs Contact: Prerana Sharma <presharm>
Priority: unspecified    
Version: 8.4CC: bwelterl, djez, fkrska, ovasik, pcahyna, presharm, qe-baseos-apps
Target Milestone: betaKeywords: Triaged
Target Release: ---Flags: pcahyna: mirror+
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: rear-2.4-19.el8 Doc Type: Bug Fix
Doc Text:
.Loss of backup data on network shares when using ReaR does not occur anymore Previously, when a network file system like NFS was used to store the ReaR backups, in case of an error ReaR removed the directory where the NFS was mounted. Consequently, this caused backup data loss. With this update, ReaR now uses a new method to unmount network shares. This new method does not remove the content of the mounted filesystem when it is removes the mount point. The loss of backup data on network shares when using ReaR is now fixed.
Story Points: ---
Clone Of: 1843585 Environment:
Last Closed: 2021-11-09 18:53:41 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:
Bug Depends On:    
Bug Blocks: 1843585, 1973448    

Comment 4 Pavel Cahyna 2021-06-07 14:07:46 UTC
Pull request fixing this problem posted for upstream review, awaiting reply.

As noted in https://github.com/rear/rear/issues/2611#issuecomment-854916232, the issue is actually more serious than the description "If we set NETFS_KEEP_OLD_BACKUP_COPY=1 and an error/interruption after output/default/100_mount_output_path.sh occurs, the exit task will rm -rF all the content of outputfs if the umount does not happen, including the old backup" suggests. It would seem that two conditions must be met for the error to happen: error/interruption during the output stage and umount not happening. Actually, if the umount command fails (for example because the mount point is in use), it satisfies both conditions: umount will not happen and it will be caught as an error leading to program termination and the bug. So the bug is actually more likely than it seems.

Comment 17 errata-xmlrpc 2021-11-09 18:53:41 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (rear bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2021:4344