RSync Run Now... Nothing?

Status
Not open for further replies.

Visseroth

Guru
Joined
Nov 4, 2011
Messages
546
So I've been fighting with trying to get SSH keys to work. Finally figured it out and got it working. Setup the same user name on each server and over ssh I am able to connect without using a password.

Perfect! Right?!?

Not so fast.
I created the RSync Tasks to push folders recursively and pull others. A rule per folder I want to push or pull as I don't want to push and pull everything but when I click on one of the rules and hit "Run Now" and "OK" and watch the logs nothing happens.
I've checked /var/logs/cron and nothing there shows it running. I've watched the messages at the bottom of the gui on both, nothing suggests it's running and I'm running PfSense for a firewall with the rule for SSH logged. So I would have seen the attempted connection, but nothing happens.

Now I do have "Validate remote Path" checked in the RSync task and when I modify the rule I can see on my firewall the SSH connection, so RSync does validate when modifying the task, but nothing happens when I tell it to run the rule now.

Anyone have any suggestions or ideas?
 

James S

Explorer
Joined
Apr 14, 2014
Messages
91
This sounds familiar! I also push "run now" and find no record in the logs.
I am sure there is an error on my part on setting up the keys.

I would like to set up rsync using the FreeNAS 11 u4 GUI. The job is to pull data from an Ubuntu 16.04 server to the FreeNAS server. I've spent quite some time with the user guide and various posts on here. However I'm missing something -- the guide seems to emphasize setting the job up as push -- and so there is no mention of private key locations on the NAS (which seem essential for a pull?). I'm also getting similar error as above i.e., "In order to use rsync over SSH you need a user . . . "

The two systems are:
- FreeNAS 11 u4 and Ubuntu 16.04
The setup and tests so far is:
- User "backup2" is setup on both systems
- I can SSH into the Ubuntu system as the user and write to the directory (i.e., /var/www/html)
- The private key of user backup2 is on the Ubuntu system
- The public key of user backup2 is on the FreeNAS (pasted in via the GUI as one line)
- I've attempted to add the public key of the FreeNAS to the knownhosts on the Ubuntu
- An rsync task is configured via the GUI - when I go to close the task setup window I get the error message about rsync needing a user. Clearly, I guess, this is not the underlying problem? (Since there is a public key pasted to the user selected in the GUI.)

I would be grateful if someone could specify the key locations and any tests to systematically to get this work.
Thanks!
 
Joined
May 10, 2017
Messages
838
Make sure you're including the full rsync path, e.g.:

Code:
/usr/local/bin/rsync -av --progress /mnt/source/ user@backupserver:/mnt/dest/
 

James S

Explorer
Joined
Apr 14, 2014
Messages
91
Thanks.
Should this script be on the machine "sending" (in my case the Ubuntu box)?
I'm hoping that the NAS is going to initiate the process (a "pull"?). Is this script not replicated with the Task -> Rysnc task window in the GUI?
 
Joined
May 10, 2017
Messages
838
If you want to pull just swap the SSH connection from destination to source, e.g.:

/usr/local/bin/rsync -av --progress user@backupserver:/mnt/source/ /mnt/dest/
 

James S

Explorer
Joined
Apr 14, 2014
Messages
91
Thanks but where does this sit in the GUI? Should the -av options be added as the bottom?
More critically, where should I put the SSH keys? Is there a naming convention I should follow?
 
Joined
May 10, 2017
Messages
838
I use this as a cron job, to use SSH keys you need to create an rsync task, can't help there, but searching the forum should get you various results.
 

Visseroth

Guru
Joined
Nov 4, 2011
Messages
546
ssh keys go in the .ssh folder of the user accounts in question.

if you cd ~./ssh it'll take you there

Interesting setting it up as a cron job, didn't think of that and it gives you more control. Still didn't answer my question about nothing happening when I hit run now though.

James, I'm almost thinking that this may be a bug and may need to be reported.
 
Status
Not open for further replies.
Top