I'm trying to setup a automatic task to backup files from my windows laptop. After a long time spent configuring everything, now i have a script running ok in the nas4free shell, but when i try to schedule it on webgui i obtain a lot of errors.
My working script is:
rsync -avs -e "ssh -i id_rsa" user@192.168.1.200:/cygdrive/c/rsync_test /mnt/storage/rsync_test
Anyone already test this method in nas4free webgui? Where i can put this parameters on webgui?
In the freenas webgui there is a combo-box to choose between rsync module mode and rsync over ssh...
This is the old XigmaNAS forum in read only mode,
it will taken offline by the end of march 2021!
I like to aks Users and Admins to rewrite/take over important post from here into the new fresh main forum!
Its not possible for us to export from here and import it to the main forum!
it will taken offline by the end of march 2021!
I like to aks Users and Admins to rewrite/take over important post from here into the new fresh main forum!
Its not possible for us to export from here and import it to the main forum!
rsync task over ssh - webgui config
-
pedro_sotta
- NewUser

- Posts: 2
- Joined: 02 May 2013 23:08
- Status: Offline
-
CMDRSweeper
- NewUser

- Posts: 11
- Joined: 17 May 2013 12:53
- Status: Offline
Re: rsync task over ssh - webgui config
I found the GUI to be too painful, so I cronjobed a script instead...
-
malcom2073
- NewUser

- Posts: 2
- Joined: 07 Jun 2013 03:19
- Status: Offline
Re: rsync task over ssh - webgui config
rsync over ssh isn't supported by the webgui. I was told that it was a useless feature, and nobody actually uses rsync in this way. You and me must be the only ones in the world that want our rsync encrypted 
Here is the patch I did to fix it, it adds a "No Daemon" option to the UI to allow you to use rsync over ssh. It's from a bit older version (9.2 sometime), so you may have to go in and manually make the changes.
Just in case someone else stumbles across this.
Here is the patch I did to fix it, it adds a "No Daemon" option to the UI to allow you to use rsync over ssh. It's from a bit older version (9.2 sometime), so you may have to go in and manually make the changes.
Just in case someone else stumbles across this.
Code: Select all
diff -ruN /etc/rc.d/rsync_client /etc/rc.d/rsync_client
--- /etc/rc.d/rsync_client Thu Jun 13 12:08:28 2013
+++ /etc/rc.d/rsync_client Thu Jun 13 12:08:28 2013
@@ -68,18 +68,40 @@
-b \
-i "count(options/reversedirection) = 0" \
-i "not(contains(rsyncserverip,':'))" \
- -v "concat('\"rsync://',rsyncserverip,'/',remoteshare,'\" \"',localshare,'\"')" -n \
+ -i "count(options/nodaemonreq) = 0" \
+ -v "concat('\"rsync://',rsyncserverip,'/',remoteshare,'\" \"',localshare,'\"')" -n \
+ -b \
+ -i "count(options/nodaemonreq) > 0" \
+ -v "concat('\"',rsyncserverip,'/',remoteshare,'\" \"',localshare,'\"')" -n \
+ -b \
-b \
-i "contains(rsyncserverip,':')" \
- -v "concat('\"rsync://\\[',rsyncserverip,'\\]/',remoteshare,'\" \"',localshare,'\"')" -n \
+ -i "count(options/nodaemonreq) = 0" \
+ -v "concat('\"rsync://\\[',rsyncserverip,'\\]/',remoteshare,'\" \"',localshare,'\"')" -n \
+ -b \
+ -i "count(options/nodaemonreq) > 0" \
+ -v "concat('\"\\[',rsyncserverip,'\\]/',remoteshare,'\" \"',localshare,'\"')" -n \
+ -b \
-b \
-b \
-i "count(options/reversedirection) > 0" \
-i "not(contains(rsyncserverip,':'))" \
+ -i "count(options/nodaemonreq) = 0" \
+ -v "concat('\"',localshare,'\" \"rsync://',rsyncserverip,'/',remoteshare,'\"')" -n \
+ -b \
+ -i "count(options/nodaemonreq) > 0" \
+ -v "concat('\"',localshare,'\" \"',rsyncserverip,'/',remoteshare,'\"')" -n \
+ -b \
+
-v "concat('\"',localshare,'\" \"rsync://',rsyncserverip,'/',remoteshare,'\"')" -n \
-b \
-i "contains(rsyncserverip,':')" \
- -v "concat('\"',localshare,'\" \"rsync://\\[',rsyncserverip,'\\]/',remoteshare,'\"')" -n \
+ -i "count(options/nodaemonreq) = 0" \
+ -v "concat('\"',localshare,'\" \"rsync://\\[',rsyncserverip,'\\]/',remoteshare,'\"')" -n \
+ -b \
+ -i "count(options/nodaemonreq) > 0" \
+ -v "concat('\"',localshare,'\" \"\\[',rsyncserverip,'\\]/',remoteshare,'\"')" -n \
+ -b \
-b \
-b \
-o "/bin/rm -f ${_rsyncflag}" -n \
diff -ruN /usr/local/www/services_rsyncd_client_edit.php /usr/local/www/services_rsyncd_client_edit.php
--- /usr/local/www/services_rsyncd_client_edit.php Thu Jun 13 12:08:32 2013
+++ /usr/local/www/services_rsyncd_client_edit.php Thu Jun 13 12:08:32 2013
@@ -76,6 +76,7 @@
$pconfig['description'] = $a_rsyncclient[$cnid]['description'];
$pconfig['who'] = $a_rsyncclient[$cnid]['who'];
$pconfig['recursive'] = isset($a_rsyncclient[$cnid]['options']['recursive']);
+ $pconfig['nodaemonreq'] = isset($a_rsyncclient[$cnid]['options']['nodaemonreq']);
$pconfig['times'] = isset($a_rsyncclient[$cnid]['options']['times']);
$pconfig['compress'] = isset($a_rsyncclient[$cnid]['options']['compress']);
$pconfig['archive'] = isset($a_rsyncclient[$cnid]['options']['archive']);
@@ -106,6 +107,7 @@
$pconfig['description'] = "";
$pconfig['who'] = "root";
$pconfig['recursive'] = true;
+ $pconfig['nodaemonreq'] = false;
$pconfig['times'] = true;
$pconfig['compress'] = true;
$pconfig['archive'] = false;
@@ -158,6 +160,7 @@
$rsyncclient['description'] = $_POST['description'];
$rsyncclient['who'] = $_POST['who'];
$rsyncclient['options']['recursive'] = isset($_POST['recursive']) ? true : false;
+ $rsyncclient['options']['nodaemonreq'] = isset($_POST['nodaemonreq']) ? true : false;
$rsyncclient['options']['times'] = isset($_POST['times']) ? true : false;
$rsyncclient['options']['compress'] = isset($_POST['compress']) ? true : false;
$rsyncclient['options']['archive'] = isset($_POST['archive']) ? true : false;
@@ -427,6 +430,7 @@
<td colspan="2" valign="top" class="listtopic"><?=gettext("Advanced Options");?></td>
</tr>
<?php html_checkbox("recursive", gettext("Recursive"), !empty($pconfig['recursive']) ? true : false, gettext("Recurse into directories."), "", false);?>
+ <?php html_checkbox("nodaemonreq", gettext("No Daemon Required"), !empty($pconfig['nodaemonreq']) ? true : false, gettext("Run without requiring remote rsync daemon"), "", false);?>
<?php html_checkbox("times", gettext("Times"), !empty($pconfig['times']) ? true : false, gettext("Preserve modification times."), "", false);?>
<?php html_checkbox("compress", gettext("Compress"), !empty($pconfig['compress']) ? true : false, gettext("Compress file data during the transfer."), "", false);?>
<?php html_checkbox("archive", gettext("Archive"), !empty($pconfig['archive']) ? true : false, gettext("Archive mode."), "", false);?>
- Lee Sharp
- Advanced User

- Posts: 251
- Joined: 13 May 2013 21:12
- Contact:
- Status: Offline
Re: rsync task over ssh - webgui config
For the record, there are now three of us. And all of the people at my consulting firm. Why is it that everyone who puts rsync in a web GUI believes that it must be done badly?
-
matejk
- NewUser

- Posts: 1
- Joined: 24 Feb 2013 00:31
- Status: Offline
Re: rsync task over ssh - webgui config
Hi!
I'm also looking for a way to use rsync over ssh via webgui. Is there a noob proof solution or extension that would enable this functionality?
p.s. there are now at least four of us who would need this
I'm also looking for a way to use rsync over ssh via webgui. Is there a noob proof solution or extension that would enable this functionality?
p.s. there are now at least four of us who would need this
- Parkcomm
- Advanced User

- Posts: 384
- Joined: 21 Sep 2012 12:58
- Location: Australia
- Status: Offline
Re: rsync task over ssh - webgui config
pedro - run it this way and post the errors, if it's not too long post, the error posting is way more verbose!
There is no reason you can't put the remote shell (ssh) in extra options box of the GUI
Code: Select all
rsync -as -vv -e "ssh -i id_rsa" user@192.168.1.200:/cygdrive/c/rsync_test /mnt/storage/rsync_testNAS4Free Embedded 10.2.0.2 - Prester (revision 2003), HP N40L Microserver (AMD Turion) with modified BIOS, ZFS Mirror 4 x WD Red + L2ARC 128M Apple SSD, 10G ECC Ram, Intel 1G CT NIC + inbuilt broadcom
- Parkcomm
- Advanced User

- Posts: 384
- Joined: 21 Sep 2012 12:58
- Location: Australia
- Status: Offline
Re: rsync task over ssh - webgui config
pedro - run it this way and post the errors, if it's not too long post, the error posting is way more verbose!
There is no reason you can't put the [-e "ssh -i id_rsa] in the extra options box of the GUI
Code: Select all
rsync -as -vv -e "ssh -i id_rsa" user@192.168.1.200:/cygdrive/c/rsync_test /mnt/storage/rsync_testNAS4Free Embedded 10.2.0.2 - Prester (revision 2003), HP N40L Microserver (AMD Turion) with modified BIOS, ZFS Mirror 4 x WD Red + L2ARC 128M Apple SSD, 10G ECC Ram, Intel 1G CT NIC + inbuilt broadcom