From a79dc0ed7247eb841753e54496b6958ce7878204 Mon Sep 17 00:00:00 2001
From: Vitor Trovisco <vmt25@cam.ac.uk>
Date: Thu, 7 Oct 2021 09:43:26 +0000
Subject: [PATCH] Update weekly_export.sh - edits to copy the export json into
 its dedicated folder within flybase-vm's archives:
 /data/export/archives/canto_export_json

---
 weekly_export.sh | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/weekly_export.sh b/weekly_export.sh
index 98c21bd..4ea5abe 100755
--- a/weekly_export.sh
+++ b/weekly_export.sh
@@ -28,6 +28,8 @@ EXPORT_DIR="${CANTOSPACE}/import_export"
 #Define export filename
 EXPORT_FILENAME=canto_server_export_latest.json
 
+#Define filepath to dedicated archives folder at export-vm
+EXPORTVM_EXPORT_ARCHIVE="$/data/export/archives/canto_export_json"
 
 log "Starting"
 
@@ -37,7 +39,7 @@ if ./canto/script/canto_docker  --non-interactive ./script/canto_export.pl canto
 	
 	if [[ -e "${EXPORT_DIR}/${EXPORT_FILENAME}" ]]; then
 
-		# Create archive directory if required
+		# Create archive directory in canto-space if required
 		ARCHIVE="${CANTOSPACE}/archive"
 
 		if [[ ! -d "${ARCHIVE}" ]]; then
@@ -59,7 +61,7 @@ if ./canto/script/canto_docker  --non-interactive ./script/canto_export.pl canto
 	
 		}
 		
-		for FILE in "${ARCHIVE}/${EXPORT_FILENAME_ARCHIVE}" "${EXPORT_DIR}/${EXPORT_FILENAME_ARCHIVE}"; do
+		for FILE in "${ARCHIVE}/${EXPORT_FILENAME_ARCHIVE}" "${EXPORTVM_EXPORT_ARCHIVE}"; do
     	archiving ${FILE}
 		done
 	
-- 
GitLab