-
-
Notifications
You must be signed in to change notification settings - Fork 268
Description
Hi,
when configuring rear with BACKUP=NETFS and NETFS_URL=... pointing to a folder not only containing backups of one single node, but other data (like backups of other nodes) rear can delete all files on the NFS location when cleaning up tmp directories. Here the scenario to reproduce:
- rear version Relax-and-Recover 1.16.1 (on SLES 11.3)
- configure rear with BACKUP=NETFS and NETFS_URL point to a directory which is not empty, so used for example by other machines to store also their backups
- login via ssh to the machine to be backed up
- start to create a backup with "rear -v mkbackup" and wait until rear shows progress about files system backup on terminal (something like "Archived 434 MiB [avg 8722 KiB/sec]")
- loose connection to your machine (either by fault or use "kill PID" where PID is the PID of your ssh session
- rear now recognizes that the session died
(Log entry in rear-.log:
/usr/share/rear/lib/_input-output-functions.sh: line 1: 38654 Hangup) - rear now tries to unmount the NFS share, but this fails unfortunately as most likely still some data is transferred
(Log entry in rear-.log:
++++ umount -f -v /tmp/rear.ZsnBUJDGiKeYRNw/outputfs
.....................
umount2: Device or resource busy) - rear ignores the umount problem and forces removal of "temp" data
(Log entry in rear-.log:
2014-09-24 16:56:43 Removing build area /tmp/rear.ZsnBUJDGiKeYRNw
++++ rm -Rf /tmp/rear.ZsnBUJDGiKeYRNw/tmp
++++ rm -Rf /tmp/rear.ZsnBUJDGiKeYRNw/rootfs
++++ rm -Rf /tmp/rear.ZsnBUJDGiKeYRNw/outputfs) - result is that all folders on NFS directory mounted by rear are gone (so also the ones not created by rear)
In my point of view this is a very nasty behaviour. Rear should not cleanup outputfs folder when NFS unmount fails.
Workaround is to point NETFS_URL= to a dedicated directory on NFS to ensure that rear can only delete backups of that single node.
Edit: I have a rear-.log with debugscript mode enabled. Unfortunately I can not attach it, github only accepts images?
Edit 2: Besides this rear works like a charm on HP DL380G8 servers running SLES 11.3. Thanks a lot for the great tool.
BR, Andreas