rsync to a ReadyNAS

Status
Not open for further replies.

JoeB

Contributor
Joined
Oct 16, 2014
Messages
121
Guys - I'm wondering if i'm running rsync correctly as its doing what I didn't expect it to do.

So my FreeNAS box is set up as seen in the "storage" tab:

Code:
/vol1/vol1/general-backup
/vol1/vol1/jails
/vol1/vol1/media-server
/vol1/vol1/web-backup

Each has its "share type" set to Windows.
When i navigate to the freenas root as a windows mapped drive, i see the above file structure, e.g.
z\general-backup\

I have 2 jails, plexmediaserver_2 (storage points to \mnt\media-server\ and a test jail where I was playing with a linux distro and virtual box called vb with no storage.

I started off a rsync using the rsync cron task. I'd like to copy everything to a ReadyNAS that is on the network at address /192.168.1.3/rsyncjoe.

rsync cron job tab:

Code:
path: /mnt/vol1
user root
remote host: admin@192.168.1.3
Mode: Rsync module
Remote module: rsyncjoe
direction: push
Every 30 mins (incase it stops so it will restart)
Option tick boxes: recursive, times, archive, delete, delay updates.
Extra options (a log file):
--verbose --progress --exclude "rsync log.txt" --log-file="/mnt/vol1/rsync log.txt"


So here is what is happened so far: its created the file structure for /general-backup/ and /jails/ inc. their sub-folders etc but there are no files in any folders.
In the progress (FreeNAS console) it shows that the files were copied, but they're not there?

I'm assuming that no files are turning up on the readynas because I ticked delay updates. If i kill the rsync process and untick that, will it then show the files next time it starts?

It has started to copy plexmediaserver_2 jail, but it is copying files from the /media-server/ into the jail
e.g.:

Code:
Sep  5 19:40:56 JOE-FREENAS rsync:
17,971,145,846 100%   21.92MB/s    0:13:01 (xfr#481795, to-chk=775755/1334872)
Sep  5 19:40:56 JOE-FREENAS rsync: vol1/jails/plexmediaserver_2/media-server/Movies/Live/BlueRay/Superman_6_-_Man_Of_Steel.mkv

Sep  5 19:58:55 JOE-FREENAS rsync:
24,773,109,103 100%   21.88MB/s    0:18:00 (xfr#481796, to-chk=775754/1334872)
Sep  5 19:58:55 JOE-FREENAS rsync: vol1/jails/plexmediaserver_2/media-server/Movies/Live/BlueRay/Taken.mkv


etc...
So what i'm thinking is it is following the jails' storage, which points to the media-server dataset.

So, is it going to copy the /media-server/ dataset to a /media-server/ folder on the readynas when it gets that far? as well as copying all the media-server stuff into the jail? If it does that, it will be duplicate, right?

What's happening? and how do I change this so it copies just the jail contents, not linked storage, and also copies the media-server dataset to a /media-server/ folder on readynas.

EDIT: Using windows, I navigated the plex jail on FreeNAS:
Z:\jails\plexmediaserver_2\media-server\
and all the media-server files are there, so there seems to be like a shortcut to the media-server folder here that windows follows, so i guess rsync is following it too. humm.. How do I disable these shortcuts to the storage that was added, is there an easy way or can I delete the storage?
 
Last edited by a moderator:

JoeB

Contributor
Joined
Oct 16, 2014
Messages
121
--one-file-system seems to exclude mountpoints inside the jail, but is also excluding dataset contents too, e.g. \vol1\media-server\ is copied as empty. Uuugh.. anyone?
 
Last edited by a moderator:

JoeB

Contributor
Joined
Oct 16, 2014
Messages
121
I excluded the jails in the end.

I have a NFS mount called "readynas" within freenas and the readynas box rsync server is called "j1".
My freenas rsync path was /mnt/vol1, and i checked only 'recursive, 'times' and 'delete'.

"Extra options" was:
--exclude "vol1/jails/" --exclude "vol1/readynas/"

If using the command line, the above produces this command:

rsync -rt --delete-delay --exclude "vol1/jails/" --exclude "vol1/readynas/" /mnt/vol1 admin@192.168.1.3::j1

If i was using the command line, i'd add vPh to give a better verbose output:

rsync -rtvPh --delete-delay --exclude "vol1/jails/" --exclude "vol1/readynas/" /mnt/vol1 admin@192.168.1.3::j1

-r = recursive
-t = preserve times
-c = checksum (this is *VERY* slow!)
-v = verbose
-P = progress and keep partial files
-h = human readable output

I thought about deleting the storage for the jails to allow rsync to backup the jails, but decided not to as it's too much hassle.
 
Status
Not open for further replies.
Top