rsync Questions

Status
Not open for further replies.

ere109

Contributor
Joined
Aug 22, 2017
Messages
190
I'm trying to transfer all of my files from a current NAS to a new FreeNAS, and my first file transfer resulted in putting the files into a subdirectory of the dataset. (Misplaced "/", which I'm trying to sort that out in another thread.) So I thought I'd come here for advice before copying my second folder (about 1TB).
I want to transfer all files from the "Media" folder, which is an SMB share on the old NAS at HD_a2/Media, to a "Media" folder on the new NAS, which also has an SMB share located at MAINSPIN/Media. I can access CLI from either machine, so I think these two commands would both work, depending on the machine used. Because root doesn't have ssh access on the FreeNAS, I used "myuser" instead. I will test with the -n command this time.

rsync -azP root@192.168.1.1:/Media /mnt/MAINSPIN/
rsync -azP /mnt/HD/HD_a2/Media/ myuser@192.168.1.2:/Media

Final questions:
Can someone explain the effects of trailing slashes on source and destination? I've read a lot, thought I had it right.
Is there an advantage to either pushing or pulling?
I've noticed examples that use both IP:folder and IP::folder, but no explanation of the second colon's purpose or effect.

Thanks
 

ere109

Contributor
Joined
Aug 22, 2017
Messages
190
SUCCESS!!! My wife's asleep, and doesn't care anyway, but I figured out all of my (known) rsync troubles tonight. It had grown to the point where I was finally reaching the correct directory, but kept getting a permissions error. After googling and reading dozens of tabs, about changing ssh settings, changing root settings, etc., I came across a page with a straight forward solution:
I was using the "-a" command, which is very powerful, and that was continually trying to change permissions in the FreeNAS share - and FreeNAS wasn't happy with that. I replicated all of the other commands that "-a" corresponds to, leaving out the -p, and suddenly my folders started populating with files. If no one else reads this, it's ok, the tree spoke in the forest.
 

fracai

Guru
Joined
Aug 22, 2012
Messages
1,212
Glad you got this figured out. The trailing slashes can be confusing. For the destination it doesn't matter. With or without the slash, your transfer will be placed in to the directory that has been specified. The source does matter. Without a slash, that directory will be transferred. With a slash, the contents of the directory will be transferred.
 
Status
Not open for further replies.
Top