Waarp R66

Waarp R66 is a monitored file transfer solution that implements the R66 protocol.

Each transfer is associated with a rule, which defines the tasks to execute before the transfer and after, both in case of success or in case of error.

Running modes

Waarp R66 can be executed in several modes:

Server
The server must use a database. Its configuration is saved in database. It can receive and send transfer requests.
Heavy client
The heavy client uses a database. Its configuration is saved in database. It can only send transfer requests.
Light client
The light client does not use a database. It uses XML files for its configuration. It can only send transfer requests.
File watcher
It is a Waarp R66 client, setup to watch a directory. Any file dropped into that directory will automatically be transfered to the R66 partner named in the configuration, with the transfer rule noted in the configuration.

In all cases, and according to the available transfer rules, the transfers can be done in push or pull mode.

Directory Used

Waarp R66 instances (server and client) use the following directories (where {hostid} is used for the identifier of the instance):

/etc/waarp/conf.d/hostid
Contains the XML configuration files for the instance
/var/lib/waarp/hostid/arch
Transfer log and configuration exports goes there.
/var/lib/waarp/hostid/db
If the instance uses an embedded database (H2), these databases are stored here
/var/lib/waarp/hostid/in
This directory contains all files received by the instance
/var/lib/waarp/hostid/out
All files to be sent by the instance should go there
/var/lib/waarp/hostid/work
Temporary files directory where files are written as they are received (once the transfer is done, the files are moved in the “in” directory).
/var/log/waarp
Directory for the services log files.

Commands

Waarp R66 instances control

Server

Waarp R66 servers can be started and stopped with the system service manager:

service waarp-r66server {start|stop|status|restart} [hostid|all]

For example, the following command starts the server server1:

service waarp-r66server start server1

If no instance identifier (hostid) is given, the action only affects the instances configured to be automatically started and stopped. If the keyword all is used, all the configured instances are affected.

In addition, the command waarp-r66server can handle some operations that are specific to Waarp R66 servers. The available subcommands are :

  • initdb: Initialize the database
  • loadconf: Load configuration from XML files in database
  • help: Show a help message

The command waarp-r66server must be followed by the identifier of the wanted instance.

For example, the following command initialize the database of the instance server1:

waarp-r66server server1 initdb

Client

Operations for Waarp R66 client instances are handled by the command waarp-r66client.

This program recognize the following subcommands:

  • send: Starts a synchronous transfer
  • asend: Starts an asynchronous transfer
  • msend: Starts multiple synchronous transfers at once
  • masend: Starts multiple asynchronous transfers at once
  • getinfo: Gets a list of file to transfer from a remote host
  • transfer: Gets information about a transfer
  • spool: Starts the client in file watcher mode
  • initdb: Initialize the database
  • loadconf: Load configuration from XML files in database
  • log-export: Export the transfer log
  • config-export: Exports the configuration
  • help: Show a help message

The command waarp-r66client must be followed by the identifier of the wanted instance.

For example, the following command starts the client fw-client in file watcher mode:

waarp-r66client fw-client spool

Start a transfer

To start the transfer of a file, use the following command in a terminal:

waarp-r66client.sh {{sender}} send -file {{file}} -to {{receiver}} -rule {{rule}}

Where:

  • {{sender}} is the identifier of the origin instance;
  • {{file}} is the path of the file to transfer;
  • {{receiver}} is the identifier of the destination instance;
  • {{rule}} is the identifier of the transfer rule to use.

For example, the following command sends the file testfile.txt of the current working directory from the client wm-client to the server server1:

waarp-r66client.sh wm-client send -file testfile.txt -to server1 -rule default

Start the file watcher

To enable the file watcher mode of the client fw-client run the command:

waarp-r66client.sh fw-client spool

fw-client is setup to watch the directory /var/lib/waarp/fw-client/spool.

The file watcher stops when a file with the name stop is created in the watched directory (the name of the file can be changed in the configuration file).