Notes:

Release Name: xnat_sync 0.1-alpha

Notes:
Installation

Requirements:


Running

Run xnat_sync with no options for usage.

"xnat_sync init" will make the connection between an XNAT resource and the local directory xnat_sync is run from. Use "init -c" to create the resource on XNAT if it does not exist.

"xnat_sync pull" will pull new or changed files from XNAT to the local directory. Use "pull -f" to force a pull in the case of a conflict.

"xnat_sync push" will push new or changed files to XNAT. Use "push -f" to force a push in the case of a conflict.

"xnat_sync status" will give the synchronization status.

Define the environment variables XNAT_USER and XNAT_PASSWORD for authenticated use. If these are undefined, the connection will be unauthenticated.

If xnat_sync is run with -s, xnat_sync will execute in "dry run" mode: the actions that would be taken are reported, but no changes are made.

All commands must be run in the top-level directory of the local copy of the resource.

xnat_sync uses file modification times to keep track of what has been synchronized and what has changed.

Examples

Copy remote scans to a local directory:

  • unset XNAT_USER
    mkdir OAS1_0010_MR1-mpr-1
    cd OAS1_0010_MR1-mpr-1
    xnat_sync init https://central.xnat.org /data/projects/CENTRAL_OASIS_CS/subjects/OAS1_0010/experiments/OAS1_0010_MR1/scans/mpr-1/resources/2760
    xnat_sync status
    xnat_sync pull


Synchronize a directory with a resource of your own:

  • export XNAT_USER=yourlogin
    export XNAT_PASSWORD=yourpassword
    cd /directory/with/data/for/xnat
    xnat_sync init -c http://your.server/xnat /data/projects/EXISTING_PROJECT/subjects/EXISTING_SUBJECT/experiments/EXISTING_EXPERIMENT/resources/test
    xnat_sync status
    xnat_sync push

    ...modify, edit, delete...

    xnat_sync status

Please send comments to christian.haselgrove@umassmed.edu.
Changes: