| #!/bin/bash |
| |
| |
| |
| |
| |
| |
|
|
| DTN="dtn-1" |
| USER="jp7467" |
| BASE_DST="/scratch/${USER}/Results/fineweb-15b" |
| LOGFILE="scp_transfer_$(date +%Y-%m-%d_%H-%M-%S).log" |
|
|
| echo "=== Starting SCP transfer at $(date) ===" | tee -a "$LOGFILE" |
|
|
| DIRS=( |
| "/scratch/${USER}/Results/fineweb-15b/2025-10-22/04:59:03.443588" |
| "/scratch/${USER}/Results/fineweb-15b/2025-10-19/15:05:06.520808" |
| "/scratch/${USER}/Results/fineweb-15b/2025-10-19/14:01:15.430122" |
| "/scratch/${USER}/Results/fineweb-15b/2025-10-19/00:24:46.370316" |
| "/scratch/${USER}/Results/fineweb-15b/2025-10-12/17:03:52.156332" |
| "/scratch/${USER}/Results/fineweb-15b/2025-10-12/17:02:29.629343" |
| "/scratch/${USER}/Results/fineweb-15b/2025-10-12/06:32:16.755461" |
| "/scratch/${USER}/Results/fineweb-15b/2025-10-12/06:29:08.235852" |
| ) |
|
|
| for SRC in "${DIRS[@]}"; do |
| echo ">>> Transferring: $SRC" | tee -a "$LOGFILE" |
|
|
| |
| REL_PATH="${SRC#/scratch/${USER}/Results/fineweb-15b/}" |
| DST_DIR="${BASE_DST}/$(dirname "$REL_PATH")" |
|
|
| |
| ssh ${DTN} "mkdir -p '$DST_DIR'" | tee -a "$LOGFILE" |
|
|
| |
| scp -rp "$SRC" "${DTN}:${DST_DIR}/" | tee -a "$LOGFILE" |
|
|
| echo ">>> Done: $SRC" | tee -a "$LOGFILE" |
| echo | tee -a "$LOGFILE" |
| done |
|
|
| echo "=== SCP transfer complete at $(date) ===" | tee -a "$LOGFILE" |