From 598c8bc21abe41f6da5244676def686096a4ff7f Mon Sep 17 00:00:00 2001 From: Andrew Kiss <31054815+aekiss@users.noreply.github.com> Date: Wed, 6 Dec 2017 09:49:21 +1100 Subject: [PATCH] somewhat safer synch (issue https://github.com/OceansAus/access-om2/issues/59) --- sync_output_to_gdata.sh | 5 +++-- sync_restarts_to_gdata.sh | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/sync_output_to_gdata.sh b/sync_output_to_gdata.sh index b016241..5ef021e 100755 --- a/sync_output_to_gdata.sh +++ b/sync_output_to_gdata.sh @@ -7,9 +7,10 @@ #PBS -N sync_output_to_gdata # Set this directory to something in /g/data3/hh5/tmp/cosima/ -# (make a unique path for your set of runs) +# Make a unique path for your set of runs. +# DOUBLE-CHECK IT IS UNIQUE SO YOU DON'T OVERWRITE EXISTING OUTPUT! GDATADIR=/ERROR/SET/GDATADIR/IN/sync_output_to_gdata.sh mkdir -p ${GDATADIR} cd archive -rsync --exclude "*.nc.*" -av --safe-links --no-g output* ${GDATADIR} +rsync --ignore-existing --exclude "*.nc.*" -av --safe-links --no-g output* ${GDATADIR} diff --git a/sync_restarts_to_gdata.sh b/sync_restarts_to_gdata.sh index 614c348..d6e2914 100755 --- a/sync_restarts_to_gdata.sh +++ b/sync_restarts_to_gdata.sh @@ -8,5 +8,5 @@ source sync_output_to_gdata.sh # to define GDATADIR and cd archive -# rsync -av --safe-links --no-g restart??[05]* ${GDATADIR} -rsync -av --safe-links --no-g restart* ${GDATADIR} +# rsync --ignore-existing -av --safe-links --no-g restart??[05]* ${GDATADIR} +rsync --ignore-existing -av --safe-links --no-g restart* ${GDATADIR}