From 4c4d4bbef78672a2481021a095675337274a56c2 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Fri, 24 Oct 2025 14:53:36 -0700 Subject: [PATCH] Additional enhancements to pulling Production backups. --- tasks/general/acct_mgmt/users.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tasks/general/acct_mgmt/users.yml b/tasks/general/acct_mgmt/users.yml index c953a91..6aa980e 100644 --- a/tasks/general/acct_mgmt/users.yml +++ b/tasks/general/acct_mgmt/users.yml @@ -813,13 +813,18 @@ return 1 fi backup_type="$1" + if [[ -f *"${backup_type}"*".zip" ]]; then + echo "File already downloaded, skipping." + ls -lh *"${backup_type}"*".zip" + return 0 + fi mkdir -pv tmp scp -P {{ prod_port }} \ {{ prod_user }}@{{ prod_host }}:"$BACKUP_DIR/*${backup_type}*.zip" \ tmp/ if [[ "$?" == "0" ]]; then echo "Succeeded!" - mv -v "tmp/*${backup_type}*.zip" ./ + mv -v tmp/*.zip ./ rmdir -v tmp else echo "Failed!"