From 81a1db39e3c5a1ffb507a8eaf7f9184ded2be904 Mon Sep 17 00:00:00 2001 From: Oleg Sheynin Date: Sat, 10 Feb 2024 21:29:19 -0500 Subject: [PATCH] fix move_archives --- utils/move_archives.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/utils/move_archives.sh b/utils/move_archives.sh index f4be001..1c1c4ef 100755 --- a/utils/move_archives.sh +++ b/utils/move_archives.sh @@ -30,7 +30,8 @@ fi DateCriteria="${Days} days ago" -TargeHost=cloudstore.cvtt.vpn +TargetHost=cloud21.cvtt.vpn +TargetRootDir=/opt/store/cvtt/archive Oldest=$(date -d "${DateCriteria}" '+%Y-%m-%d') Now=$(date '+%Y%m%d_%H%M%S') @@ -53,7 +54,7 @@ if [ "$files" == "" ] then echo "No files found older than ${Oldest} in ${ArchiveDir}" else - Target="${TargetHost}:/home/cvtt/Archive/${FromHost}/" + Target="${TargetHost}:${TargetRootDir}/${FromHost}/" echo "Moving files to ${Target}:" echo ----------------- for f in ${files} @@ -66,7 +67,7 @@ else Cmd="${Cmd} $files" Cmd="${Cmd} ${Target}" echo ${Cmd} - # exit +# exit eval ${Cmd} fi echo Done ${0} ${*}