Hard linked files synced as individual files #48
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
"-H" should be added to $rsync_options to have any hard linked files synced as hard links and not as indivividual files.
As an example, the bzcat files in the source are all hard linked files with the same inode, while the destination has these as three separate files.
Source
root@hall2:/mnt/clone/bin# cd /bin root@hall2:/bin# ls -li bunzip2 bzcat bzip2 998 -rwxr-xr-x 3 root root 30404 Jan 29 2017 bunzip2 998 -rwxr-xr-x 3 root root 30404 Jan 29 2017 bzcat 998 -rwxr-xr-x 3 root root 30404 Jan 29 2017 bzip2 root@hall2:/bin#
Clone
root@hall2:/tmp# cd /mnt/clone/bin/ root@hall2:/mnt/clone/bin# ls -li bunzip2 bzcat bzip2 475 -rwxr-xr-x 1 root root 30404 Jan 29 2017 bunzip2 493 -rwxr-xr-x 1 root root 30404 Jan 29 2017 bzcat 508 -rwxr-xr-x 1 root root 30404 Jan 29 2017 bzip2 root@hall2:/mnt/clone/bin#
The good news is that adding -H to the rsync flags will correct the clone on the next run.
Clone after re-running rpi-clone with -H added to rsync flags
root@hall2:/mnt/clone/bin# ls -li bunzip2 bzcat bzip2 475 -rwxr-xr-x 3 root root 30404 Jan 29 2017 bunzip2 475 -rwxr-xr-x 3 root root 30404 Jan 29 2017 bzcat 475 -rwxr-xr-x 3 root root 30404 Jan 29 2017 bzip2 root@hall2:/mnt/clone/bin#