diff --git a/infrastructure/nomad/playbooks/templates/jobs/mev-commit-geth.nomad.j2 b/infrastructure/nomad/playbooks/templates/jobs/mev-commit-geth.nomad.j2 index b8c29c076..b9010d71f 100644 --- a/infrastructure/nomad/playbooks/templates/jobs/mev-commit-geth.nomad.j2 +++ b/infrastructure/nomad/playbooks/templates/jobs/mev-commit-geth.nomad.j2 @@ -107,6 +107,17 @@ job "{{ job.name }}" { {{- end }} {% endraw %} + {% raw %} + {{ with nomadVar "nomad/jobs" }} + BACKUP="{{ .MEV_COMMIT_GETH_CHAIN_BACKUP }}" + {{ end }} + {% endraw %} + + if [[ "${BACKUP}" == "true" ]]; then + echo "Detected ongoing data backup, terminating..." + exit 1 + fi + BACKUP_FILE="local/backups/$( ls -1 local/backups/ | sed -r 's/(.*)_dirty/\1/' | @@ -267,6 +278,17 @@ job "{{ job.name }}" { {{- end }} {% endraw %} + {% raw %} + {{ with nomadVar "nomad/jobs" }} + BACKUP="{{ .MEV_COMMIT_GETH_CHAIN_BACKUP }}" + {{ end }} + {% endraw %} + + if [[ "${BACKUP}" == "true" ]]; then + echo "Detected ongoing data backup, terminating..." + exit 1 + fi + mkdir -p "${GETH_DATA_DIR}" > /dev/null 2>&1 {% if job.artifacts | selectattr('keystore', 'defined') | list | length > 0 %}