rdup
rdup copied to clipboard
rdup-simple: backup stops in cp step (at soft cross-device links)
rdup-simple backups stopped working for me because cp -plr returns an error if soft cross-device links are found, e.g. cp: cannot create hard link src/a tgt/a Invalid cross-device link ** rdup-simple: Illegal return code from rdup-simple -L
(This might be related to an OS upgrade from openSUSE 13.1 to openSUSE 13.2 ?)
I changed the return code for a failed cp -plr from 2 to 0 and the backup seems to work again, but this looks like a dangerous hack.
I analyzed the problem on 3 more machines. The issue is triggered by moving from cp version 8.21 to version 8.23 (as found in openSUSE 13.2, Ubuntu 15.04, and other recent distros). I must add that also soft links leading outside the last backup cause rdup-simple to stop with a similar error message:
cp: cannot stat ‘/data/.../file1’: No such file or directory ... ** rdup-simple: Illegal return code from rdup-simple -L
The work-around I suggested above is not perfect because the soft links (like file1 above) will be missing in your backups! Is there a cp option (or similar) that could help here?
[ Quoting [email protected] in "Re: [rdup] rdup-simple: backup stop..." ]
I analyzed the problem on 3 more machines. The issue is triggered by moving from cp version 8.21 to version 8.23 (as found in openSUSE 13.2, Ubuntu 15.04, and other recent distros). I must add that also soft links leading outside the last backup cause rdup-simple to stop with a similar error message:
cp: cannot stat ‘/data/.../file1’: No such file or directory ... ** rdup-simple: Illegal return code from rdup-simple -L
The work-around I suggested above is not perfect because the soft links (like file1 above) will be missing in your backups! Is there a cp option (or similar) that could help here?
I'll try to look into this, but I have some severe time constrants as I'm mostly working on other projects...
I've encountered the same after an upgrade from coreutils 8.21 to 8.23. I've managed to track it down to the following change in coreutils 8.22: "cp --link now dereferences a symbolic link as source before creating the hard link in the destination unless the -P,--no-deref option is specified. Previously, it would create a hard link of the symbolic link, even when the dereferencing options -L or -H were specified." (https://savannah.gnu.org/forum/forum.php?forum_id=7815) So I tried adding the -P option to the cp call in rdup-simple, and that seems to have fixed it. I hope this helps, Luca.
I assume that most machines now have a coreutils version that is affected by this issue. Why not change rdup-simple
as discussed?