Vous avez reçu un message "Your GitLab account has been locked ..." ? Pas d'inquiétude : lisez cet article https://docs.gricad-pages.univ-grenoble-alpes.fr/help/unlock/

Commit 13caf446 authored by Jonathan Schaeffer's avatar Jonathan Schaeffer
Browse files

Metadata first

parent 3718cf39
......@@ -37,6 +37,21 @@ fi
# Get the snapshot name for this month
MONTH=$(date +%Y-%m)
log "Starting dump of metadata from ${RESIFDD_DATADIR}/validated_seismic_metadata/.snapshot/monthly.${MONTH}-01_0000"
tar cf $RESIFDD_WORKDIR/validated_metadata.tar -C $RESIFDD_DATADIR/validated_seismic_metadata/.snapshot/monthly.${MONTH}-01_0000 $RESIFDD_DATADIR/validated_seismic_metadata/.snapshot/monthly.${MONTH}-01_0000
imv validated_metadata/previous.tar validated_metadata/previous_to_delete.tar
imv validated_metadata/latest.tar validated_metadata/previous.tar
iput $RESIFDD_WORKDIR/validated_metadata.tar validated_metadata/latest.tar
if [[ $? -ne 0 ]]; then
# Something went wrong, roll back
imv validated_metadata/previous.tar validated_metadata/latest.tar
imv validated_metadata/previous_to_delete.tar validated_metadata/previous.tar
fi
log "Dump of metadata done"
SNAPSHOT_DIR="${RESIFDD_DATADIR}/validated_seismic_data/.snapshot/monthly.${MONTH}-01_0000"
if [[ ! -d $SNAPSHOT_DIR ]]; then
......@@ -130,11 +145,4 @@ for dir in $(find . -maxdepth 3 -type d); do
log "[$KEY] Sent successfully"
log "Cleaning generated tar $RESIFDD_WORKDIR/$YEAR_$NETWORK_$STATION.tar"
done
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"
Markdown is supported
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