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

BUILD_DIR removal can result in unwanted file deletion over NFS #383

Closed
toomaskiisk opened this issue Mar 28, 2014 · 3 comments
Closed

BUILD_DIR removal can result in unwanted file deletion over NFS #383

toomaskiisk opened this issue Mar 28, 2014 · 3 comments

Comments

@toomaskiisk
Copy link

function cleanup_build_area_and_end_program() in framework-functions.sh contains following line:

            rm -Rf $BUILD_DIR/outputfs

When using NFS target, BUILD_DIR is the same as BACKUP_URL. It happened that BUILD_DIR was still mounted when this command was run, resulting in loss of all files there. I'm unable to reproduce it right now but it certainly happened several times. I was also having trouble with poor NFS server response time at the same time, maybe this caused some unusual code path to be run. Not sure why but it can cause cause unwanted deletes, Maybe BUILD_DIR should point to temporary location, not to backup destination.

@gdha gdha added the support label Apr 1, 2014
@gdha gdha self-assigned this Apr 1, 2014
@gdha
Copy link
Member

gdha commented Apr 1, 2014

The BUILD_DIR is defined in ./rear:BUILD_DIR="$(mktemp -d -t rear.XXXXXXXXXXXXXXX)"

++ [[ -d /tmp/rear.qP5aLwuy8VgZeMv/outputfs/fedora20 ]]
++ rmdir -v /tmp/rear.qP5aLwuy8VgZeMv/outputfs
rmdir: removing directory, '/tmp/rear.qP5aLwuy8VgZeMv/outputfs'

According an earlier mail from you:

OUTPUT_URL=file:///backup/
BACKUP=NETFS
BACKUP_URL=nfs://nfs.host.uu/some/dir

The OUTPUT_URL was not going to NFS, but a local file system. However, if I understood it well /backup is a NFS mounted file system. What you should do is or unset OUTPUT_URL or define a proper nfs mount point

@gdha gdha added this to the Rear v1.16 milestone Apr 4, 2014
@gdha
Copy link
Member

gdha commented Apr 16, 2014

@toomaskiisk could you please comment?

@toomaskiisk
Copy link
Author

removed OUTPUT_URL parameter and I'm doing backup to mounted NFS share (BACKUP_URL=file:///...). It works too, but I need to mount correct NFS directory manually before recover. That's all.

@gdha gdha closed this as completed Apr 16, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants