Scripted Resilio Sync Installation

Scripted Resilio Sync Installation

Joined
Jan 4, 2014
Messages
1,644
You can use also Emby instead of Plex.
"Camera upload allows automatic uploading of photos taken from mobile devices to your Emby Server. It requires Emby apps installed on your mobile devices as well as for the app to support the feature."

In some aspects, Emby is also the better choice, like privacy, no required account, no need to connect to the Internet, etc.
Good to know. Thanks for the heads up.
 
Joined
Jan 4, 2014
Messages
1,644
This resource appears to survive a jail upgrade from FreeBSD 11.3 to 12.2.
 

slowmail

Cadet
Joined
Dec 17, 2019
Messages
9
Hello,

I'm 100% new to TrueNAS, and it seems to have a somewhat steep learning curve.
I have a mini XL+, and am currently trying to get resilio working on it.

I used the script setup the jail, and I can access the web interface.
The following datasets and mount points were created:

/mnt/pool/apps/rslsync/config -> /mnt/pool/iocage/jails/rslsync/root/var/db/rslsync
/mnt/pool/apps/rslsync/data -> /mnt/pool/iocage/jails/rslsync/root/media

And I added a user and group rslsync with UID/GID 817

I'd like resilio to have read/write access to other datasets, and added the following mount point:

/mnt/pool/abc -> /mnt/pool/iocage/jails/rslsync/root/medla/abc

But once I do so, the jail is no longer able to start, and I get the following error message:
Error: [EFAULT] jail: ioc-rslsync: mount.fstab: /mnt/pool/iocage/jails/rslsync/root/media/abc: No such file or directory

Could anyone advise what I might be doing wrong here?
Dataset abc has owner/group set to rslsync

Thanks.
 
Joined
Jan 4, 2014
Messages
1,644
I think you may be confusing rslsync with rsync. What is it you're trying to do? If you're trying to back up a dataset, local replication may be a better option than rsync
 
Last edited:

slowmail

Cadet
Joined
Dec 17, 2019
Messages
9
I think you may be confusing rslsync with rsync. What is it you're trying to do? If you're trying to back up a dataset, local replication may be a better option than rsync

Erm, no. I'm not confused between rsync, and Resilio Sync (rslsync).
What am I trying to do? Use Resilio Sync, with my FreeNAS unit.

I currently have a QNAP NAS, with Resilio Sync on it, and am in the process of retiring QNAP unit, and replacing it with the FreeNAS Unit.
We have a number of Resilio shares, that are synced/shared with several different machines via Resilio, and a copy is held in the NAS. The NAS acts as a form of backup (in case a laptop is misplaced), and it also allows users to access their data from their smartphones (with the Resilio app).

I was planning to have different shares in different datasets and pools.

eg:
/mnt/pool1/abc-mydocuments
/mnt/pool1/def-mydocuments
/mnt/pool2/media
/mnt/pool2/photos

In the jail, these would appear as:

/media/abc-mydocuments
/media/def-mydocuments
/media/media
/media/photos

At the same time, I want to make sure that any file or directories written to /media, that do not fall into an existing dataset, will be written to /mnt/pool/apps/rslsync/data. The reason for this was, when I was first experimenting with this jail, I failed to mount /media correctly; and when I dropped a share into it, freenas-boot filled up, and the system fell over - to the point where I couldn't even perform a configuration reset without assistance from support.

The alternative might be to make /media itself non-writable? But that didn't seem like a very good way to do it...

Thanks for any advice.
 
Joined
Jan 4, 2014
Messages
1,644
Extract from the install README:
  • DATA_PATH: Selective backups are stored in this path; defaults to $POOL_PATH/apps/rslsync/data.
Your backups are stored below the DATA_PATH within a specified pool.

You can create child datasets under this DATA_PATH and map those to shares if you so desire.

tn01.jpg


My personal preference is just to map the rslsync root to a single share and then restrict user access using ACLs e.g. selective backups for a user's device are stored under a user directory root within the DATA_PATH under the rslsync share. The user has read access to the backups under their directory root. The user's directory root is invisible to other users apart from an administrator.


tn02.jpg
 

slowmail

Cadet
Joined
Dec 17, 2019
Messages
9
Your backups are stored below the DATA_PATH within a specified pool.
You can create child datasets under this DATA_PATH and map those to shares if you so desire.

View attachment 50631

My personal preference is just to map the rslsync root to a single share and then restrict user access using ACLs e.g. selective backups for a user's device are stored under a user directory root within the DATA_PATH under the rslsync share. The user has read access to the backups under their directory root. The user's directory root is invisible to other users apart from an administrator.

I see. Does this mean it is not possible for resilio to access datasets that are in a different pool?

I have another question. Currently, resilio is accessed via http://ipaddress:8888
How can I change this to use https instead (self-signed is fine)?
 
Joined
Jan 4, 2014
Messages
1,644
Does this mean it is not possible for resilio to access datasets that are in a different pool?
One option might be to add a second rslsync jail with a DATA_PATH that refers to a different pool.
I have another question. Currently, resilio is accessed via http://ipaddress:8888
How can I change this to use https instead (self-signed is fine)?
I have my rslsync jail behind a Caddy reverse proxy. For details, refer to the resource Reverse Proxy using Caddy (with optional automatic TLS).
 

slowmail

Cadet
Joined
Dec 17, 2019
Messages
9
One option might be to add a second rslsync jail with a DATA_PATH that refers to a different pool.

I have my rslsync jail behind a Caddy reverse proxy. For details, refer to the resource Reverse Proxy using Caddy (with optional automatic TLS).

Thank you for the suggestions. I will look into it.

Quick question about a second rslsync jail for pool2; Would both instances will run as user/group rslsync (id: 817)? If so, is there anything that I might need to be aware of or careful about, or will it generally be fine?

One other question I have; should each jail (rslsync; caddy; rslsync2; etc) have a different/unique ip address (and different from the TrueNAS web user interface ip address)? Or can they co-exist on the same ip address?
 
Joined
Jan 4, 2014
Messages
1,644
Would both instances will run as user/group rslsync (id: 817)? If so, is there anything that I might need to be aware of or careful about, or will it generally be fine?
Yes, the UID/GID of 817 is a requirement.

should each jail (rslsync; caddy; rslsync2; etc) have a different/unique ip address (and different from the TrueNAS web user interface ip address)? Or can they co-exist on the same ip address?
Yes, the script requires each rslsync instance on a TN server to have its own IP address and a unique JAIL_NAME. For each additional rslsync instance, you'll have to consider script parameters POOL_NAME, and optionally, CONFIG_PATH and DATA_PATH as well.
 
Last edited:

slowmail

Cadet
Joined
Dec 17, 2019
Messages
9
Yes, the UID/GID of 817 is a requirement.


Yes, the script requires each rslsync instance to have its own IP address, however, additional instances on the same TN server must have a unique JAIL_NAME. For each additional rslsync instance, you'll probably have to adjust script parameters POOL_NAME, CONFIG_PATH and DATA_PATH as well.

At this time, instead of a second rslsync jail, I was able to do the following instead:

Mount points:
/mnt/pool1/apps/rslsync/data -> /mnt/pool/iocage/jails/rslsync/root/media
/mnt/pool2/apps/rslsync/data -> /mnt/pool/iocage/jails/rslsync/root/media2

and put the corresponding datasets under there - this seems to allow access to pool1 via /media, and pool2 via /media2.
The jail starts up, and it seems to work, but I'm not sure if it might lead to anything falling over... Do you think if this would be fine?

Thanks again for the help, and the great script. =)
 
Last edited:
Joined
Jan 4, 2014
Messages
1,644
The jail starts up, and it seems to work, but I'm not sure if it might lead to anything falling over... Do you think if this would be fine?
Well, good to know you found a workaround. This is not something I've tried out myself so I'm not sure if there will be any undesirable side effects.
 

Mike05

Cadet
Joined
Dec 12, 2016
Messages
5
Hi all,

I recently noticed that rslsync was not working on my rig (copying files from my Android phone to my NAS) since March. I figure it is possibly due to a TrueNAS update back then. I looked into this installation script after updating to TrueNAS-13-RELEASE, as it seems a good way of surviving TrueNAS updates. I followed the instructions on the github page for setting up the dataset directories and subdirectories, IP addresses etc., but I am getting a "Failed to create jail" error message.

My main question at this stage, noting that the github documentation states that the script should work up to TrueNAS CORE 12.0, is: has anyone got this script working with TrueNAS-13.0-RELEASE?

EDIT: My fault. I didn't set the config variables in rslsync-config correctly. After checking and correcting them, the script installs as expected. I successfully logged into the web interface. Now to configure the backups - I will post back later with progress.

EDIT 2: To answer my question, rslsync and the script work well on TrueNAS-13.0-RELEASE. I am able to sync photos from my phone to the media folder. The other thing I needed to do before I could get it working from the phone was to uninstall the sync app and reinstall the latest version from the Play Store.

Cheers,
Mike.
 
Last edited:
Joined
Jul 29, 2022
Messages
3
I'm running into a problem I'm not entirely sure how to resolve. For context, I recently upgraded this server from FreeNAS 11.1, to 11.3, to TrueNAS 12.0. I had Resilio Sync configured previously, but the upgrade to 11.3 removed the plugin and jail.

I followed the instructions, but when I ran the script, I got the error "12.2-RELEASE was not found!"

To make sure my config file wasn't the problem, I cleared all the variables except the Jail and Gateway IP addresses, and still got the error.

Has anyone else seen this issue before?

Thank you!

Max
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
This is because 12.2-RELEASE was end-of-lifed by upstream FreeBSD. You'll need to download it from the FreeBSD archive.


However, as 12.2-RELEASE is no longer getting security updates, you should use 12.3-RELEASE for the script.

Note, 11.3 is when the cutover to iocage from warden happened, so you can delete the jails dataset underneath your root dataset to recover some space.
 
Joined
Jul 29, 2022
Messages
3
This is because 12.2-RELEASE was end-of-lifed by upstream FreeBSD. You'll need to download it from the FreeBSD archive.


However, as 12.2-RELEASE is no longer getting security updates, you should use 12.3-RELEASE for the script.

Note, 11.3 is when the cutover to iocage from warden happened, so you can delete the jails dataset underneath your root dataset to recover some space.
Thank you so much, and sorry for the trouble! I thought I'd done enough searching last night, but obviously not :)

Rather than modifying the script to search for 12.3 and not 12.2, I upgraded to TrueNAS 13, and the script ran without any problems.

Thank you again!
 

oncdoc

Dabbler
Joined
Dec 19, 2022
Messages
46
I love resilio sync. In regards to trueness scale any chance that we can get the docker version working? You would think that since it is a private company product that they would be all over it to optimize it for us so we can purchase the product like I have.
 
Top