rsync: need help resolving a "nomenclature" question

I’ve used rsync for a while, and it’s always performed very well. However, trying to rsync my macOS (source, APFS file system) with my Synology NAS (dest, btrfs filesystem) seems to always present "challenges" that I don’t find in other uses of rsync.

Some of my "challenges" are with the nomenclature used in (particularly) the rsync documentation; i.e. man rsync. I’m hoping to find some clarification with this question; following are the specifics:

rsync is "one-way" synchronization; man rsync describes the -i (--itemize-changes) as follows:
[output is cryptic string] that is 11 letters long. The general format is    
YXcstpoguax, where Y is replaced by the type of update being done ... 

A < means that a file is being transferred to the remote host (sent)  

A > means that a file is being transferred to the local host (received)

When using the following rsync command:

# Version:
rsync --version
rsync  version 3.2.7  protocol version 31   

# The command (simplified)
rsync -rlAtgoDiv /Users/seamus/Desktop/ /Volumes/backups/Desktop

I get the following output:

>f..t....... BooksBlogsEtc/pix/Capucine02.jpg

This is where I lose the plot. The > says "file being transferred to local host (received)", but taking this statement at face value, it says that the file is being transferred to my Mac and from the NAS – it is being received. IOW, I have conflated the term source with sent and (to a lesser degree) local host. But this is not what seems to be going on – the file in the example above is being sent from the source/Mac to the dest/NAS.

Can someone explain these apparent discrepancies to me?

Asked By: Seamus

||

Rsync runs in three different modes.

  • Copy from remote to local (pull)
  • Copy from local to remote (push)
  • Copy from local to local (local)

"sent" and "received" have an unambiguous meaning in the first two cases, not so much in the third.

When you use a local to local copy, it will always show the > symbol for transfers.

While your /Volumes/backup/Desktop may be backed by a NAS, rsync doesn’t know that. It’s not using any of the remote protocols that define a remote side (remote shell or rsync daemon). As far as the program is concerned, these are just local filesystems. The network portion isn’t being done by rsync, it’s being done by your OS. As such, it will always show >.

If your NAS had an rsync daemon and you chose to connect to it via something like:

rsync -rlAtgoDiv /Users/seamus/Desktop/ user@nas.local:/backup/Desktop

then rsync would treat the destination as a remote device and it would show the transfer with a < character.

Answered By: BowlOfRed
Categories: Answers Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.