Page tree
Skip to end of metadata
Go to start of metadata

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.

ValueNotesExample
urlURL to the FileCloud server to usehttp://files.company.com
accountName of the user account to be used for syncingjohn
passwordPassword for the user account to be used for syncingpassword
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 specified the number of offline folders to be specified. Each Offline Folder is further specified by adding an appropriate "offline_folder_n" entry.
Note that n starts from 1 and goes till the max specified.

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>|<REMOTE FOLDER>|<SYNCTYPE>|<SCHEDULE>|<RECURSE INTO DIRECTORIES>|<ALLOW REMOTE DELETION>

<LOCAL FOLDER> = E.g: C:\data\localfolder
<REMOTE FOLDER> = E.g.: /john/folder1
<SYNC TYPE> = 0 - 2 Way Sync, 1 - Backup from Local to Remote, 2 - Read only copy of remote files to local
<SCHEDULE>=  1h (every 1 hour), 2h (every 2 hours), 4h (every 4 hours), 8h (every 8 hours), 24h (every 24 hours), 30m (every 30 minutes)
<RECURSE INTO DIRECTORIES> = 1 - Recurse (top level and sub folders are synced), 0 - Not Recurse (only top level folder is synced) 
<ALLOW REMOTE DELETION> = 1- Allowed (Local deletes are not propagated to server) , 0-Disallowed (Local deletes are not propagated to server)


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.

ValueNotes
syncfolderlocationThis location is where the sync folder is created. Any files added or modified here are synced back to the filecloud server.
syncclientlocationThis 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.
lockmutexThis value has no effect, just leave it at 0
loglevelThis 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

 

 

  • No labels