Commit ea0e8c94 authored by Jonathan Schaeffer's avatar Jonathan Schaeffer
Browse files

Simple metadata dump

parent 0ce9ab0f
......@@ -45,7 +45,6 @@ if [[ ! -d $SNAPSHOT_DIR ]]; then
# Checking IRODS environment
if [[ ! -f ~/.irods/.irodsA ]] ; then
log "The irods scrambled password file is not present. Please run iinit and provide the password"
exit 1
......@@ -63,7 +62,7 @@ log "Starting dump of validated data"
for dir in $(find . -maxdepth 3 -type d); do
# First clean workspace
rm -f $RESIFDD_WORKDIR/*.tar
IFS='/' read -r -a YNS <<< $dir
[ ! ${#YNS[@]} -eq 4 ] && continue
......@@ -126,3 +125,11 @@ for dir in $(find . -maxdepth 3 -type d); do
log "[$KEY] Sent successfully"
log "Cleaning generated tar $RESIFDD_WORKDIR/$YEAR_$NETWORK_$STATION.tar"
log "Dump of validated data done"
log "Starting dump of metadata"
tar cf $RESIFDD_DATADIR/validated_seismic_metadata/.snapshot/monthly.${MONTH}-01_0000 $RESIFDD_WORKDIR/validated_metadata.tar
irm validated_metadata/previous.tar
imv validated_metadata/latest.tar validated_metadata/previous.tar
iput $RESIFDD_WORKDIR/validated_metadata.tar validated_metadata/latest.tar
log "Dump of metadata done"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment