I synchronize data with rsync --delete --backup --backup-dir=[some directory] -avz [source] [destination].
- On the machine where rsync is executed, both
[source]and[destination]directories are NFS exports mounted locally (i.e. the machine running rsync is a NFS client). - after a succesfull
rsync+ some checks, the backup is deleted.
Another machine of my LAN is an application server and has this same [destination] NFS export mounted locally.
Due to some intricacies on the application side I have NO CONTROL on, it looks like the application refers to files by their inodes rather than using their names. Which brings difficulties when a file was changed from [source] :
- let's say that on
[destination], this file has the inode123 - the application "points to" the file having the inode
123 - rsync detects a difference between the
[source]and[destination]versions of this file and has to transfer it - before transferring it, it creates a backup by "moving" it : the backup file now has the inode
123 - the updated version of the file is transferred by rsync, and gets a new inode (
456) - after a successfull rsync + checks, the backup is deleted : no file has the inode
123anymore - the application, still pointing to inode
123, is broken
- Do you confirm I got it clear about how
rsync --backupworks and inodes ? - How does the
--inplacersync option work with--backup:
- will rsync create a backup file having its own inode ?
- will the file keep its current inode ?