Sync for Netgear ReadyNAS
A command line version of the sync app is provided for Netgear ReadyNAS series of Network Attached Storage devices. Currently only x86-64 versions running ReadyNAS OS 6.0 and above are supported. (ReadyNAS 312 for example is known to work)
Installation
Download the regular Linux x86-64 package and unzip the contents to any location on your NAS.
Configuration
In the unzipped folder, create an xml file called syncconconfig.xml and enter the credentials to the filecloud server to which to sync to.
Value | Notes | Example |
---|---|---|
url | URL to the FileCloud server to use | http://files.company.com |
account | Name of the user account to be used for syncing | john |
password | Password for the user account to be used for syncing | password |
limitfolders | If specified, only the folders specified are synced. Multiple folders can be specified using the '|' as the delimiter This entry is optional and can be omitted. | /john/folder1|/john/folder2|/john/folder3 |
offline_folder_count | If specified, the folders specified are connected for 2 way sync, backup or one way read-only copy of remote files. This entry is optional and can be omitted. | 2 |
offline_folder_n | Specifies the offline folder sync settings. The folder value is specified using 6 parameters using the following format <LOCAL FOLDER> = E.g: C:\data\localfolder | C:\data\local|/john/folder1|0|30m|1|0 |
<?xml version="1.0" encoding="UTF-8" ?> <variantrow> <rowentry> <name>url</name> <type>string</type> <value>http://files.company.com</value> </rowentry> <rowentry> <name>account</name> <type>string</type> <value>john</value> </rowentry> <rowentry> <name>password</name> <type>string</type> <value>password123</value> </rowentry> <rowentry> <name>limitfolders</name> <type>string</type> <value>/john/folder1|/john/folder2|/john/folder3</value> </rowentry> <rowentry> <name>offline_folder_count</name> <type>int</type> <value>2</value> </rowentry> <rowentry> <name>offline_folder_1</name> <type>string</type> <value>C:\data\local|/john/folder1|0|1h|1|0</value> </rowentry> <rowentry> <name>offline_folder_2</name> <type>string</type> <value>C:\data\local2|/john/folder2|1|30m|1|0</value> </rowentry> </variantrow>
Also, adjust the contents of the xml file called syncclientconfig.xml and adjust the paths to whatever that you need.
Value | Notes |
---|---|
syncfolderlocation | This location is where the sync folder is created. Any files added or modified here are synced back to the filecloud server. |
syncclientlocation | This location is where sync stores temporary files as well as all the sync state information. It is recommended to delete the folder to reset the state or when changing to a different sync server. |
lockmutex | This value has no effect, just leave it at 0 |
loglevel | This value affects the amount of logging performed by the sync client. 'trace' is the default and allows full logging |
<?xml version="1.0" encoding="UTF-8" ?> <variantrow> <rowentry> <name>lockmutex</name> <type>bool</type> <value>0</value> </rowentry> <rowentry> <name>loglevel</name> <type>string</type> <value>trace</value> </rowentry> <rowentry> <name>syncclientlocation</name> <type>string</type> <value>/root/FileCloudSyncData</value> </rowentry> <rowentry> <name>syncfolderlocation</name> <type>string</type> <value>/root/FileCloud</value> </rowentry> </variantrow>
Startup
Create a startup script to startup the sync app and save it to a file called filecloudsyncconstart.sh
#!/bin/sh -e export LD_LIBRARY_PATH=. ./filecloudsynccon 2> /dev/null 1>&2
Make sure to set the executable permissions on the file
chmod +x ./filecloudsyncconstart.sh
Finally to start the application, do the following:
./filecloudsyncconstart.sh