Transfers between GLADE file spaces

CISL recommends using rsync -av (or cp -rp) rather than Globus for moving data between GLADE spaces. Neither rsync nor cp alone preserves permissions, ownership and so on, but they will with the options shown. (Globus does not preserve the symbolic links that are common in working directories, and it does not create symbolic links on destination endpoints.)

These examples show how to use rsync -av in a batch script, in this case for transferring files from /glade/p_old/work/$USER to /glade/work/$USER.

When your script is ready, start the job by running sbatch as described here:

Starting jobs on Casper nodes

For tcsh users

Insert your own project code where indicated and customize other settings as needed for your own job.

#!/bin/tcsh
#SBATCH -J rsync_work
#SBATCH -n 1
#SBATCH --ntasks-per-node=1
#SBATCH -t 24:00:00
#SBATCH -A project_code
#SBATCH -p dav
#SBATCH -o rsync.%j

setenv TMPDIR /glade/scratch/$USER/temp
mkdir -p $TMPDIR

### Run rsync -av
cd /glade/p_old/work/$USER
rsync -av . /glade/work/$USER

### End job

For bash users

Insert your own project code where indicated and customize other settings as needed for your own job.

#!/bin/bash -l
#SBATCH -J rsync_work
#SBATCH -n 1
#SBATCH --ntasks-per-node=1
#SBATCH -t 24:00:00
#SBATCH -A project_code
#SBATCH -p dav
#SBATCH -o rsync.%j

export TMPDIR=/glade/scratch/$USER/temp
mkdir -p $TMPDIR

### Run rsync -av
cd /glade/p_old/work/$USER 
rsync -av . /glade/work/$USER

### End job

Related training courses