# FreeBSD rsync module



## krkbryant08 (Sep 24, 2010)

How to configure the rsync daemon on FreeBSD so that I can connect  to my freeNAS server. And create a module for my FreeBSD. FreeBSD is my rsync client and freenas rsync server.


----------



## mix_room (Sep 24, 2010)

I have no idea what you want to do as I can not understand your question. 

But what I am assuming is that you want to rsync some files from your FreeBSD computer to your FreeNAS machine. 

[cmd="usr"]rsync -OPTIONS /path/to/files username@freenas.local:/remotepath/to/files[/cmd]

And _READ_ the manuals: 
http://www.samba.org/rsync/examples.html
http://www.comentum.com/rsync.html


----------



## AndyUKG (Sep 24, 2010)

krkbryant08 said:
			
		

> how to configure the rsync daemon on FreeBSD so that i can connect  to my freeNAS server. and create a module for my freebsd. freeBSd is my rsync client and freenas rsync server



If your question is how to install rsync as a server and as a client on FreeBSD, the answer is just install from ports:


```
# cd /usr/ports/net/rsync
make install
```

If you have a question on the details of how to setup an rsync server, and how to connect clients to this there is an rsync list for this, you will find it if you google it 

Andy.


----------



## krkbryant08 (Sep 27, 2010)

*rsync module*

Here's my problem:

I have freeNAS server and I have a FreeBSD OS.
I want my freeNAS server to pull files from my FreeBSD.
How to create an rsync module for my freeBSD OS that it connects to my freeNAS server?. Where my freeNAS server pulls the backup files from my FreeBSD OS. 

I need some steps on how to create FreeBSD rsync module.


----------



## jb_fvwm2 (Sep 27, 2010)

It will only answer part of your question, but
search "bwlimit" in the forums.  It shows a long
rsync command that may be useful if not in whole,
in part...  (check all threads...)


----------



## krkbryant08 (Oct 1, 2010)

*rsync module problem*


```
freenas:~# rsync -avz kapdian@192.168.105.142::fbackup /mnt/kirk/
receiving incremental file list

sent 29 bytes received 53 bytes 164.00 bytes/sec
total size is 0 speedup is 0.00
```


---why is it that i cannot pull the files on my freeBSD OS.

kapdian - is the username on my FreeBSD
192.168.105.142 - is the ip address of my freeNAS
fbackup - is the name of the module on FreeBSD
/mnt/kirk/ - is where I stored all my .tar files on my FreeBSD OS.

My problem is I want my freeNAS to pull the files stored on /mnt/kirk/ on the FreeBSD.

When I tried to execute the above command, no files were pulled.


----------



## wblock@ (Oct 1, 2010)

krkbryant08 said:
			
		

> freenas:~# rsync -avz kapdian@192.168.105.142::fbackup /mnt/kirk/
> receiving incremental file list
> 
> sent 29 bytes received 53 bytes 164.00 bytes/sec
> ...



I can't tell what you mean by "module" (maybe "directory"), and it's not exactly clear which machine is which.  It appears that /mnt/kirk is on the FreeNAS computer, and fbackup is on the FreeBSD computer.

But there are some problems in that command line.  Only need one colon.  If you don't specify a full path, rsync will use the user's home directory.  rsync, like some other programs, needs a slash at the end of a directory name if you want to copy the contents of the directory.  So, on the FreeNAS computer, try:
`% rsync -avz [email=kapdian@192.168.105.142]kapdian@192.168.105.142[/email]:~/fbackup/ /mnt/kirk/`

That will copy everything from the  ~/fbackup directory in the home directory of user kapdian on the computer at 192.168.105.142 into the /mnt/kirk directory on the FreeNAS computer.


----------



## krkbryant08 (Oct 1, 2010)

```
rsync -avz kapdian@192.168.105.142:~/fbackup/ /mnt/kirk/
```
When running this command freeNAS asked me a password. when i entered my kapdian password there's an error 


```
kapdian@192.168.105.142's password:
Permission denied (publickey,password).
rsync: connection unexpectedly closed (0 bytes received so far) [Receiver=3.0.7]
```

Why?


----------



## krkbryant08 (Oct 1, 2010)

It worked! But i have another problem.
When I tried to run this command


```
rsync -avz root@192.168.105.142:/root/ ~/kirk
```

I cant see the tar files I stored in root on my FreeBSD.
Whats is the rsync option so that I can pull .tgz files?


----------



## wblock@ (Oct 1, 2010)

krkbryant08 said:
			
		

> It worked! But i have another problem.
> When I tried to run this command
> 
> 
> ...



Please show exactly what happened.  See this to capture the output.

Further: root login via ssh is disabled by default.  *Don't change that.*  Change permissions on those files so they are readable by other users, or put them in a different directory.


----------

