|
From: | Andrew Ferguson |
Subject: | Re: [rdiff-backup-users] how to exclude mount point on destination, |
Date: | Fri, 4 Jul 2008 10:31:12 -0400 |
On Jul 4, 2008, at 2:52 AM, lo73fr wrote:
Hi, I try to do a rdiff-backup between to linux computer other SSH. The directory tree is following: source dest /opt /opt | ||___ dir1 |---- Apache (empty mount point)| |--- Some files | | |___ Apache (mount point) |--- Some filesMy troubles is coming from the fact that "Apache" directory is a mount point (both on source and destination tree) for another filesystem.When I use the following rdiff-backup:rdiff-backup -v 5 --print-statistics --exclude-if-present apache -- exclude-symbolic-links --force --exclude-other-filesystems -- exclude /opt/apache /opt address@hidden::/optrdiff-backup complains about "device or resource busy" on the destination directory "/opt/apache". Sending back exception [Errno 16] Device or resource busy: '/opt/ apache' of type <type 'exceptions.OSError'>:This is true, because destination "/opt/apache" is mount, so can't delete it !I try many combination of exclude options on rdiff-backup, but can't manage to remove this error.Any help would be apreciate. Laurent
Hi Laurent, Does this do what you want?rdiff-backup -v 5 --print-statistics --exclude-symbolic-links -- exclude-other-filesystems /opt address@hidden::/opt
When you specify the "--exclude-if-present bad_file" option, it means that it should exclude any directories which contain a file named "bad_file". For example, this is commonly used as "--exclude-if- present .no_backup", which allows users to put a ".no_backup" file in any directories which they want excluded from the backup process. Based on what you are trying to accomplish, I don't think you want this.
When you specify the "--exclude /opt/apache" option, rdiff-backup will completely remove the "/opt/apache" directory from its view of the source. Thus, when it tries to mirror the source to the destination, it sees the "/opt/apache" directory on the destination, believes that it is not in the source, and thus tries to remove it. This causes the error that you report.
The "--exclude-other-filesystems" option should be enough to make rdiff-backup skip any files inside the mount point since it would detect that the files *under* /opt/apache/ are on a separate filesystem. Since the directory/mount-point /opt/apache is on the /opt filesystem, it is ok with it, and thus would not try to remove it from the destination.
Also, you almost certainly do NOT want to use the "--force" option. Rdiff-backup will tell you if it needs that option. If you use it without thinking about it, rdiff-backup will perform destructive operations without asking you.
Andrew
[Prev in Thread] | Current Thread | [Next in Thread] |