Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • While the Sync Tool is running, these commands are available. Just type them on the command line where the tool is running. These commands are not available when running in exit-on-completion mode.

    Short Command

    Long Command

    Description

    x

    exit

    Tells the Sync Tool to end its activity and close

    c

    config

    Prints the configuration of the Sync Tool (the same information is printed at startup)

    s

    status

    Prints the current status of the Sync Tool

    l <Level>

    N/A

    Changes the log level to <Level> (may be any of DEBUG, INFO, WARN, ERROR)

    h

    help

    Prints the runtime command help

Running the Sync Tool in a server shell environment

As noted above, the Sync Tool can be run in one of two modes, one which allows it to run continually, and the other which allows it to exit once it completes transferring all current files. The mode you choose will determine the way in which you deploy the Sync Tool on a server. The following examples assume the use of the bash shell.

To start the Sync Tool in continually running mode, you would use a command like this:

Code Block
nohup java -jar duracloudsync-{version}.jar {parameters} > ~/synctool-output.log 2>&1 &
In this case, the & at the end of the command instructs the command to run in the background, and the "nohup" at the beginning tells the command to continue running even when the terminal being used is closed or when you disconnect from the server machine. The output of the Sync Tool would be placed in a file called "synctool-output.txt" in the user's home directory.
In order for the Sync Tool to be run on startup when the server machine boots, additional settings will need to be added which depend on the operating system being used. In Ubuntu, for example, an Upstart script would be used for this purpose.
Running the Sync Tool in exit on completion mode works best when the tool is run on a scheduled basis. A popular choice for handling this type of task is the cron utility. To run daily using cron a script should be placed in /etc/cron.daily. The script would look something like:

 

Code Block
#!/bin/bash
  
java -jar duracloudsync-{version}.jar -x [parameters] >> ~/synctool-output.log 2>&1

The -x parameter is included here to ensure the Sync Tool exists after completing its run.