Rsync over SSH

Status
Not open for further replies.

peter-swe

Dabbler
Joined
Apr 10, 2015
Messages
35
Hi guys. I've asked a bit before about backup solutions. And yeah I'm still looking for the best way.
And I must say. I like Rsync very very much.

Right now I have a not very safe way to do it (because of human error). Manually running Rsync from a macs terminal window.
Writing the password every time. Yeah I know. Not very good.

So I went ahead and got SSH to work with public keys and what not and now I can run a password free rsync from the FreeNAS Shell.
Code:
rsync -r "/mnt/Raid/Server/Folder" 'server@192.168.1.2:"/Volumes/Backup/"'

Works good no need to enter password any more.

But when I add the information to FreeNAS built in Rsync-function, it doesn't work.
I can make cron job and just use the rsync command. But not the Rsync tasks. Anyone know if it's any different from the cron jobs? Should I just leave it as cron jobs and be on my marry way?
 
D

dlavigne

Guest
Which build of FreeNAS (from System -> Information)? Which options did you pick in the GUI when configuring the rsync task?
 

peter-swe

Dabbler
Joined
Apr 10, 2015
Messages
35
Sorry I should have told you right away.
My build is
FreeNAS-9.3-STABLE-201511040813

I'll upload an image of my rsync settings as well. Just a minute.
 

peter-swe

Dabbler
Joined
Apr 10, 2015
Messages
35
Screenshot_2015-11-09-17-03-47.png Screenshot_2015-11-09-17-04-43.png sorry for the images. Take from phone through vnc. I can upload something better later
 

peter-swe

Dabbler
Joined
Apr 10, 2015
Messages
35
I actually didn't notice an error at first. But now it's flowing like never before.
Nov 10 09:00:00 media-server rsync: rsync: connection unexpectedly closed (0 bytes received so far) [sender]
Nov 10 09:00:00 media-server rsync: rsync error: error in rsync protocol data stream (code 12) at io.c(226) [sender=3.1.1]
Nov 10 09:04:00 media-server rsync: rsync: on remote machine: --delete-delay: unknown option
Nov 10 09:04:00 media-server rsync: rsync error: syntax or usage error (code 1) at /SourceCache/rsync/rsync-42/rsync/main.c(1333) [server=2.6.9]

So I turned off the Delete option and it seems to work!
I then added
--delete
In the extra options which seems to work fine.

Seems that delete-delay is a Rsync 3 feature. And Apple doesn't upgrade Rsync due to licensing conflicts. --delete-after should work though. Should do pretty much the same.
Guess I could update it manually.

Thanks for your help!
 
Status
Not open for further replies.
Top