The Scenario
I'm backing up one of my Debian wheezy machines via rsnapshot. The target directory is a mounted NFS share. A Qnap NAS serves this target directory.
The Problem
But rsnapshot complains about some file already existing, when it tries to create a new snapshot via cp -al. It doesn't matter if i use gnu-cp or rsnapshot's cp:
root@shuttle:~# rsnapshot -v daily
echo 25852 > /var/run/rsnapshot.pid
/bin/rm -rf /mnt/backup/rsnapshot/daily.6/
mv /mnt/backup/rsnapshot/daily.5/ /mnt/backup/rsnapshot/daily.6/
mv /mnt/backup/rsnapshot/daily.4/ /mnt/backup/rsnapshot/daily.5/
mv /mnt/backup/rsnapshot/daily.3/ /mnt/backup/rsnapshot/daily.4/
mv /mnt/backup/rsnapshot/daily.2/ /mnt/backup/rsnapshot/daily.3/
mv /mnt/backup/rsnapshot/daily.1/ /mnt/backup/rsnapshot/daily.2/
native_cp_al("/mnt/backup/rsnapshot/daily.0", \
"/mnt/backup/rsnapshot/daily.1")
----------------------------------------------------------------------------
rsnapshot encountered an error! The program was invoked with these options:
/usr/bin/rsnapshot -v daily
----------------------------------------------------------------------------
ERROR: Warning! "/mnt/backup/rsnapshot/daily.1/shuttle/etc/alternatives/Mail.1.gz" exists!
ERROR: Warning! copy_symlink("/mnt/backup/rsnapshot/daily.0/shuttle/etc/alternatives/Mail.1.gz", "/mnt/backup/rsnapshot/daily.1/shuttle/etc/alternatives/Mail.1.gz")
[-- snip! --]
The Twist
The fun thing is: The file that is giving rsnapshot (or cp -al) a hard time actually exists twice! Look at the inodes at the beginning of the line. Here's the output of ls -li on my Debian Box:
lennart@shuttle:~$ ls -li /mnt/backup/rsnapshot/daily.0/shuttle/etc/alternatives/ |grep -i mail
71047301 lrwxrwxrwx 1 root root 23 Oct 28 09:32 mail -> /usr/bin/heirloom-mailx
71047299 lrwxrwxrwx 1 root root 23 Oct 28 09:32 Mail -> /usr/bin/heirloom-mailx
71047302 lrwxrwxrwx 1 root root 39 Oct 28 09:32 mail.1.gz -> /usr/share/man/man1/heirloom-mailx.1.gz
71047300 lrwxrwxrwx 1 root root 39 Oct 28 09:32 Mail.1.gz -> /usr/share/man/man1/heirloom-mailx.1.gz
71047300 lrwxrwxrwx 1 root root 39 Oct 28 09:32 Mail.1.gz -> /usr/share/man/man1/heirloom-mailx.1.gz
71047303 lrwxrwxrwx 1 root root 23 Oct 28 09:32 mailx -> /usr/bin/heirloom-mailx
71047304 lrwxrwxrwx 1 root root 39 Oct 28 09:32 mailx.1.gz -> /usr/share/man/man1/heirloom-mailx.1.gz
Here's the same ls -l1 executed on the server that is exporting the directory:
[~] # ls -li /share/backup/rsnapshot/daily.0/shuttle/etc/alternatives/ |grep ->
71047299 lrwxrwxrwx 1 admin administ 23 Oct 28 09:32 Mail -> /usr/bin/heirloom-mailx
71047300 lrwxrwxrwx 1 admin administ 39 Oct 28 09:32 Mail.1.gz -> /usr/share/man/man1/heirloom-mailx.1.gz@
71047301 lrwxrwxrwx 1 admin administ 23 Oct 28 09:32 mail -> /usr/bin/heirloom-mailx
71047302 lrwxrwxrwx 1 admin administ 39 Oct 28 09:32 mail.1.gz -> /usr/share/man/man1/heirloom-mailx.1.gz@
71047303 lrwxrwxrwx 1 admin administ 23 Oct 28 09:32 mailx -> /usr/bin/heirloom-mailx
71047304 lrwxrwxrwx 1 admin administ 39 Oct 28 09:32 mailx.1.gz -> /usr/share/man/man1/heirloom-mailx.1.gz@
The Question
Does anyone have any ideas what could have caused this and how to solve it?
[edit 1]
the same ls from a machine running OS X 10.9:
thebook-wlan:~ lennart$ ls -li /Volumes/backup/rsnapshot/daily.0/shuttle/etc/alternatives/ |grep -i mail
71047299 lrwxrwxrwx 1 root wheel 23 28 Okt 09:32 Mail -> /usr/bin/heirloom-mailx
71047300 lrwxrwxrwx 1 root wheel 39 28 Okt 09:32 Mail.1.gz -> /usr/share/man/man1/heirloom-mailx.1.gz
71047301 lrwxrwxrwx 1 root wheel 23 28 Okt 09:32 mail -> /usr/bin/heirloom-mailx
71047302 lrwxrwxrwx 1 root wheel 39 28 Okt 09:32 mail.1.gz -> /usr/share/man/man1/heirloom-mailx.1.gz
71047303 lrwxrwxrwx 1 root wheel 23 28 Okt 09:32 mailx -> /usr/bin/heirloom-mailx
71047304 lrwxrwxrwx 1 root wheel 39 28 Okt 09:32 mailx.1.gz -> /usr/share/man/man1/heirloom-mailx.1.gz
Only my Debian box seems to have problems with the directory listing.