Mirroring a dataset from FreeNAS to a Lacie NAS using Rsync

Status
Not open for further replies.

Rod Sott

Cadet
Joined
Feb 25, 2015
Messages
8
Hello guys, I just built my first FreeNAS station, and I'm stuck in a major step: I need to copy and sync a Dataset from FreeNAS to a Lacie 2Big NAS using Rsync. On Lacie's Dashboard there's an option that enables the backup using Rsync which is called NetBackup server, that uses ports 22 or 873.

I read the FreeNas 9.3 manual, but there's just an example of a FreeNAS-to-FreeNAS Rsync setup.

Since there's no way to add a file into the Lacie, probably the Rsync using SSH would not work, because I can not put the generated key into the Lacie.

At all my trials, there's always the same error, among others:

NAS rsync: TERM: Undefined variable.

The Lacie will be in a remote place, using a DynDNS to locate it. I tried even locally, but without success.

Even a help to Rsync from FreeNAS to a Windows folder.. maybe can clarify the path syntaxes somehow.

Thanks in advance!
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
Well, it's clunky, but you could get SyncBackFree from 2brightsparks software, and use that to sync to the windows folder. Then if you can rsync to the Lacie from there...
 

Rod Sott

Cadet
Joined
Feb 25, 2015
Messages
8
Nice software, DrKK... the Pro version seems to help syncing some computers into one.. I was thinking to use some of FreeNAS´s plugins like Crashplan or OwnCloud.. I´ll take a closer look, thanks for the advice.

But for this issue above, would be very clunky.. since I have around 5Tb that I need to sync between FreeNAS and a remote Lacie.. I can´t afford another computer to bridge the data. I want it to sync directly with the Lacie..

Maybe some examples of how to setup the Rsync fields would help. Even putting the Lacie local IP, it still gives the NAS rsync: TERM: Undefined variable error.

Thanks!
 

Rod Sott

Cadet
Joined
Feb 25, 2015
Messages
8
Humm.. Haven´t tried this, anodos... The Lacie NetBackup gives me these infos:

NAS Name, Login, Password and port (22 or 873 for encrypted backups). And I have 192.168.0.10 for Lacie IP.

I already created on FreeNAS an User "netbackup" which is the Lacie´s Login... and with the password Lacie gave me.

What would be Command syntax inside "Add Cron Job" window? Should I put the User "netbackup" or the Daemon?

The directory seems to be automatically inside a "\\NetBackup" Lacie creates, but I read in a Forum that I must have another directory inside it for this to work.. Please give me a syntax thinking that the "NetBackup" folder is at the root of Lacie.
 

Rod Sott

Cadet
Joined
Feb 25, 2015
Messages
8
See here: https://www.freebsd.org/cgi/man.cgi?query=rsync&apropos=0&sektion=0&manpath=FreeBSD 8.0-RELEASE and Ports&format=html

I don't know if I would entirely give up on tunneling it through SSH. You can always perform an nmap scan of the Lacie server and see if it has a listening SSH server. If so, you can try ssh-copy-id then configure an rsync task in the webgui.

Thanks for the tip about NMAP.. didn´t know about it. I tried it at the Shell, but it gave me "bash: nmap: command not found" . Then searching the Net, I ran the "pkg_add -r nmap" line at the shell, and it installed it..

About the SSH, I think Lacie have it built in, but you can´t configure a custom setup.. The NMAP on Lacie gave me this:

Code:
Starting Nmap 6.40 ( http://nmap.org ) at 2015-02-26 14:11 BRT                                                                   
Initiating ARP Ping Scan at 14:11                                                                                                
Scanning 192.168.0.10 [1 port]                                                                                                   
Completed ARP Ping Scan at 14:11, 0.20s elapsed (1 total hosts)                                                                  
Initiating Parallel DNS resolution of 1 host. at 14:11                                                                           
Completed Parallel DNS resolution of 1 host. at 14:11, 5.51s elapsed                                                             
Initiating SYN Stealth Scan at 14:11                                                                                             
Scanning 192.168.0.10 [1000 ports]                                                                                               
Discovered open port 8888/tcp on 192.168.0.10                                                                                    
Discovered open port 443/tcp on 192.168.0.10                                                                                     
Discovered open port 445/tcp on 192.168.0.10                                                                                     
Discovered open port 80/tcp on 192.168.0.10                                                                                      
Increasing send delay for 192.168.0.10 from 0 to 5 due to 11 out of 30 dropped probes since last increase.                       
Discovered open port 22/tcp on 192.168.0.10                                                                                      
Discovered open port 139/tcp on 192.168.0.10                                                                                     
Discovered open port 873/tcp on 192.168.0.10                                                                                     
Discovered open port 548/tcp on 192.168.0.10                                                                                     
Discovered open port 631/tcp on 192.168.0.10                                                                                     
Discovered open port 3260/tcp on 192.168.0.10                                                                                    
Discovered open port 2222/tcp on 192.168.0.10                                                                                    
Completed SYN Stealth Scan at 14:11, 5.23s elapsed (1000 total ports)                                                            
Nmap scan report for 192.168.0.10                                                                                                
Host is up (0.000088s latency).                                                                                                  
Scanned at 2015-02-26 14:11:41 BRT for 10s                                                                                       
Not shown: 989 closed ports
                                                                                                      
PORT     STATE SERVICE                                                                                                           
22/tcp   open  ssh                                                                                                               
80/tcp   open  http                                                                                                              
139/tcp  open  netbios-ssn                                                                                                       
443/tcp  open  https                                                                                                             
445/tcp  open  microsoft-ds                                                                                                      
548/tcp  open  afp                                                                                                               
631/tcp  open  ipp                                                                                                               
873/tcp  open  rsync                                                                                                             
2222/tcp open  EtherNet/IP-1                                                                                                     
3260/tcp open  iscsi                                                                                                             
8888/tcp open  sun-answerbook             


So, we have 22 and 873 to work with.

What I really need is some help on setting the Rsync, because all my trials gave me the same NAS rsync: TERM: Undefined variable error. I even created a Rsync Module with the FreeNAS folder I want to send to Lacie, but the error remains the same... :(
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
I'm guessing that message is coming from the Lacie.

If so, it means that there's no TERM environment variable being passed. This would arguably be a problem with the Lacie, since for automated scripting, there's no reason to expect a TERM. You could try to emulate this from the command line to see if it is the case.

# csh
# unsetenv TERM
# ssh (whatever the ssh command would have been to get into the Lacie)
(error expected)
# setenv TERM cons25
# ssh (whatever the ssh command would have been to get into the Lacie)
(no error expected)
 

Rod Sott

Cadet
Joined
Feb 25, 2015
Messages
8
I'm guessing that message is coming from the Lacie.

If so, it means that there's no TERM environment variable being passed. This would arguably be a problem with the Lacie, since for automated scripting, there's no reason to expect a TERM. You could try to emulate this from the command line to see if it is the case.

Nope, jgreco.. The message is not coming from Lacie. I changed the IP, so FreeNAS wouldn't find the Lacie... and the error remains.

In Shell, I typed "set" to see what was set... and there's a term=xterm-color set there.


Besides the TERM error, it shows right under it: rsync: @ERROR: Unknown module 'HOMENAS'

My Rsync Task is like this:

upload_2015-2-26_21-17-23.png


...and at the Lacie's Dashboard is like this:


upload_2015-2-26_21-14-43.png


And at the router, both 22 and 873 ports are opened.

It all seems to be right, but the errors are still there. :(
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Well of course a TERM is going to be set in shell. That's just UNIX 101. It isn't clear whether that's just a spurious message if FreeNAS happens to be generating it.

Unfortunately I don't use rsync for this and I'm on vacation so that's as far as I will be likely to proceed on this thread.
 

RobertT

Explorer
Joined
Sep 28, 2014
Messages
54
You could mount your LACIE via cifs on your freenas and simply rsync from freenas to the mounted share..
 
Status
Not open for further replies.
Top