Skip to content

Commit 068b82f

Browse files
committed
Revert "fix copying backup to canfar"
This is already in a different PR
1 parent ba7fb36 commit 068b82f

1 file changed

Lines changed: 4 additions & 10 deletions

File tree

possum_pipeline_control/check_status_and_launch_3Dpipeline_v2.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -483,8 +483,7 @@ def run_prefect_db_backup():
483483
ts = datetime.now(timezone.utc).strftime("%Y-%m-%dT%H%M%SZ")
484484
OUTDIR = Path.home() / "prefect-backups"
485485
OUTDIR.mkdir(parents=True, exist_ok=True)
486-
db_file_name = f"prefect-{ts}.sql"
487-
db_backup = OUTDIR / db_file_name
486+
db_backup = OUTDIR / f"prefect-{ts}.sql"
488487

489488
cmd = ["bash", bkpscript, str(db_backup)]
490489
result = subprocess.run(cmd, capture_output=True, text=True)
@@ -504,14 +503,9 @@ def run_prefect_db_backup():
504503
)
505504
# --- Copy to CANFAR ---
506505
print("Copying the backup to CANFAR...")
507-
try:
508-
client = Client()
509-
VOS_FOLDER = "arc:projects/CIRADA/polarimetry/software/prefect-backups"
510-
remote_file = f"{VOS_FOLDER}/{db_file_name}"
511-
client.copy(str(db_backup), remote_file)
512-
print("Backup completed successfully")
513-
except Exception as e:
514-
print(f"Failed to copy backup to CANFAR: {e}")
506+
client = Client()
507+
client.copy(str(db_backup), "arc:projects/CIRADA/polarimetry/software/prefect-backups")
508+
print("Backup completed successfully")
515509

516510
if __name__ == "__main__":
517511
parser = argparse.ArgumentParser(

0 commit comments

Comments
 (0)