From 4591a0e0326591ed4e08a5632022d766a5ce5d98 Mon Sep 17 00:00:00 2001 From: simon Date: Mon, 6 Mar 2023 16:06:53 +0700 Subject: [PATCH] fix remove source file flag --- helper_scripts/db_sync.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/helper_scripts/db_sync.sh b/helper_scripts/db_sync.sh index 9398637..8723a1f 100755 --- a/helper_scripts/db_sync.sh +++ b/helper_scripts/db_sync.sh @@ -12,11 +12,11 @@ echo "------------------------------------------------------------" printf "\n -> backup\n" ssh $remote_host 'docker exec postgres pg_dump -U archivist | gzip > backup.gz' printf "\n -> download\n" -rsync --progress -r --delete-after -e ssh $remote_host:backup.gz /tmp/backup.gz +rsync --progress -r --remove-source-files -e ssh $remote_host:backup.gz /tmp/backup.gz # sync printf "\n -> sync\n" -rsync --progress -r --delete-after /tmp/backup.gz -e ssh $local_host:backup +rsync --progress -r --remove-source-files /tmp/backup.gz -e ssh $local_host:backup ssh $local_host 'gzip -df backup/backup.gz' # replace