can I do this using jails?

Status
Not open for further replies.

seanwang

Dabbler
Joined
Feb 19, 2018
Messages
11
This is related to the problem I posted here.. https://forums.freenas.org/index.php?posts/443033

I currently have some scripts running rsync to sync files in FreeNAS to another Windows machine. There are some problems and I need to upgrade rsync to fix it.
My question is if I install latest rsync in a jail, i must also run the script in the jail in order to use the latest rsync in that jail?

Currently the rsync script is outside jail and I need to run it using root (through the rsync function via GUI). If I install rsync in jail, how can I run it as a root to sync files in the host (outside the jail).
 
Last edited by a moderator:

kdragon75

Wizard
Joined
Aug 7, 2016
Messages
2,457
Yes you will need to run the script from inside the jail. With that said you can add your storage readonly if you prefer to the jail and setup crontab "manually"

Edit: I just assumed this is part of a backup schedule and that you would want to run on a schedule.

Just googled a bit and relized you can send a command to a jail (DUH) using jexec.

so you could edit your script to call rsync as "jexec JAILNAME /usr/bin/wherever/rsync -some opts" OR keep the script the way it is and just use "jexec JAILNAME /home/user/script"

This way you can still manage it from the GUI
 
Last edited:
Status
Not open for further replies.
Top