Using a JFS Server for Synchronization

Why using a JFS server?

Sometimes it is not possible to hook an external file system in your local structure. For instance, (1) a Unix/Linux file server doesn't provide Samba, or NFS sharing capabilities, (2) it is - for some reasons - not possible to share a Windows folder, or (3) the access to an external server is protected by a firewall or you have limited access to the server capabilities in general.

In all those cases you can use a JFS server to synchronize your files. A JFS server provides a simple interface for clients in order to get information from a server or to modify an external file system.

How to use a JFS server?

(1) Login to the server you want to synchronize with (e.g., via an SSH session or Windows Terminal Client).

(2) Start the JFS server on the server machine: You can do this via the command line, using java -jar <JFS library> -server [-base <base directory>], e.g., java -jar lib/jfs.jar -server. If no base directory is specified, the current working directory is used. You can get an overview of all server options via the JFS command line help. Alternatively, if you may start the server via the JFS graphical user interface JFS, if you have direct access to a graphical input device of the machine that should act as a server. In this case, you can easily specify all server options as part of your synchronization profile.

(3) Start the JFS application on your local host. If you want to access the JFS server as target and/or source directory, you have to modify the corresponding entry in the list of directory pairs in the following way: ext://<host name>/<directory relative to JFS server's base>, e.g., ext://localhost/documents. That is, if a source or target starts with ext:// it is assumed that it has to be accessed via an external JFS server. You can modify the source or target of a directory pair to comply the above syntax by double-clicking on an already existing entry of your synchronization profile manager.

(4) Compare and synchronize as usual. During comparison and synchronization, the server should display status information about the currently performed actions.

What about security issues?

The access to a JFS server is protected by a pass phrase. You may specify one for your server with the -passphrase option on the command line. The default pass phrase is JFS. If you don't specify your individual pass phrase any JFS client that is able to connect to the specified server port may connect to your server and modify your file system. Therefore, it is highly recommended to change the pass phrase before using a JFS server.

The data transmission is not encrypted. If you want to encrypt the connection to you local computer you should use an SSH tunnel and forward the JFS server port, which is set to 55200 by default.

If you specify an individual pass phrase, you also have to set the pass phrase on your client profile. You can do this via the JFS server settings dialog in the profile manager.

Some Hints

You can change the used port of a JFS server using the -port option. The default port is set to 55200. If you want to access a JFS server on a different port you can enter the used port in the name of a source or target directory as follows: ext://<host name>:<port>/<directory relative to JFS server's base>, e.g., ext://localhost:56000/documents.

You may store all server settings into your profile. This includes the used port, the pass phrase, and the server's base directory. After that you simply specify the profile at server startup time: java -jar <JFS library> -server -config <your profile>, e.g., java -jar lib/jfs.jar -server -config profiles/Synchronize.xml.

If the application doesn't behave as expected, have a look at the client's log information and the server's status output. If you find many socket timeouts there, you may try to increase the used socket timeout via the command line or the profile management dialog.