SOLVED Rsync from Linux to FreeNAS - Succeeds but can't find files

dakotta

Dabbler
Joined
Oct 12, 2018
Messages
42
I am attempting to set up rsync over ssh to transfer files from my Arch Linux box to my new FreeNAS box.

I had some difficulty setting up the rsync command, but I eventually succeeded. The first time I fired off the command, I saw a list of files being transferred, with an exit code = 0. Afterward, I immediately fired off the command again... I saw: "sending incremental file list", followed by a prompt, but no files were transferred. The exit code was 0, indicating that all the files were already on the destination.

However, I can't find them, so I'm not sure where the files actually went.

I can successfully ssh into the FreeNAS machine from the Arch box, using:

Code:
ssh -p 10001 dakotta@10.10.1.56

When I do this, it drops me into my home folder for my user account (not root). This is where I'm expecting rsync to put my new files.

System Dataset Pool = homeArchive
My home folder is the dataset: dakotta
Dataset permissions on dakotta: rwx for the owner, dakotta

After I ssh into the FreeNAS machine:
Code:
freenas% pwd
/mnt/homeArchive/dakotta

rsync command issued on my Arch box to transfer files from my 'temp' folder to the FreeNAS box at local IP address = 10.10.1.56
Code:
rsync --port=10001 -aAXHzz --progress /home/dakotta/temp/ dakotta@10.10.1.56/temp

When the command finishes executing, the files are not located at: /mnt/homeArchive/dakotta. But I can't find them anywhere else either. I can move to the root folder, and start a search from there. The command succeeds, but finds only files that I have manually created... not any of the files that rsync was supposed to send.
Code:
freenas% pwd
/
freenas% sudo find . -type f -name "*Zoot*" -exec echo '{}' \;

Weird.

Is the rsync command actually failing?
Or are the files somewhere else?
As an aside, my wife keeps hearing a strange noise out by the rubbish bins. Maybe that's where they're going?

Cheers,
 
Last edited:
Joined
Oct 22, 2019
Messages
3,641
Shouldn't it be:
Code:
dakotta@10.10.1.56:/mnt/homeArchive/dakotta/temp
 
Joined
Oct 22, 2019
Messages
3,641
As an aside, my wife keeps hearing a strange noise out by the rubbish bins. Maybe that's where they're going?

If she Right-clicked > Delete, then yes. I would suggest you search through the rubbish bins. ;)
 

dakotta

Dabbler
Joined
Oct 12, 2018
Messages
42
Shouldn't it be:
Code:
dakotta@10.10.1.56:/mnt/homeArchive/dakotta/temp

Well, that's the first thing I tried (explicitly calling out the full path), but that resulted in the following error...
Code:
$ rsync --port=40001 -aAXHzz --progress /home/dakotta/temp/ dakotta@10.10.1.56/mnt/homeArchive/dakotta/temp
sending incremental file list
rsync: [Receiver] mkdir "/home/dakotta/dakotta@10.10.1.56/mnt/homeArchive/dakotta/temp" failed: No such file or directory (2)
rsync error: error in file IO (code 11) at main.c(784) [Receiver=v3.2.3]

... which didn't make any sense to me, so I tried using a relative path.

When I switched to a relative path, rsync behaved somewhat like it does when the target is an external hard drive (e.g., it reports sending the incremental file list, then it lists the files as they are sent.)

But your response made me realize I was missing the colon between the IP address and the destination path. Correcting that led to:
Code:
$ rsync --port=40001 -aAXHzz --progress /home/dakotta/temp/ dakotta@10.10.1.56:/mnt/homeArchive/dakotta/temp
ssh: connect to host 10.10.1.56 port 22: Connection refused
rsync error: unexplained error (code 255) at log.c(245) [sender=v3.2.3]

Which made me realize rsync wasn't accepting a my specific port.

That lead me to the correct syntax...
Code:
$ rsync -rvz -e 'ssh -p 40001' --progress /home/dakotta/temp/ dakotta@10.10.1.56:/mnt/homeArchive/dakotta/temp

... where the port number is called out using the -e option. I still need to thrash out which other options I need... but that's a different problem.

Thank you very much!

Cheers,
 
Joined
Oct 22, 2019
Messages
3,641
No problem, and glad it's working!

Remember, rsync is very particular about colons and trailing slashes. For example, a trailing slash for the source means "from within this directory, copy its contents into the destination", while a missing trailing slash means "this directory will be copied into the destination".


As for colons, there's a major distinction between no colon, a single colon, and a double colon.

From what I understand, no colon means local transfer.
Code:
rsync -avH /home/lisa/ /media/usb/home-backup/


Single colon means remote transfer (uses SSH by default).
Code:
rsync -avH /home/lisa/ lisa@192.168.0.101:/mnt/mainpool/backups/lisa/homedir/


Double colon means the destination is running a daemon, with a specifically named rsync "module".
Code:
rsync -avH /home/lisa/ lisa@192.168.0.101::lisa-home-backup


The above examples all use the default ports for ssh and rsync.

Rsync in daemon mode is supposedly faster since their is no encryption overhead, but the files are sent in plaintext (unencrypted) by default. The daemon running on the server also helps cut down on initializing a file list.
 
Last edited:

dakotta

Dabbler
Joined
Oct 12, 2018
Messages
42
Found them!
Code:
rsync --port=10001 -aAXHzz --progress /home/dakotta/temp/ dakotta@10.10.1.56/temp

This rsync command (on my machine) ignores the --port=portnumber request unless it is expressed as 'ssh -p portnumber'.

Also, with the colon missing between the IP address and the destination path, the rsync command creates a new folder in my local (source machine) home folder named 'dakotta@10.10.1.56' and dumps everything there.

Thanks again, winnielinnie!

Cheers,
 
Top