From 55bbc043b257595c9c204fa0acb08c8c35794f3c Mon Sep 17 00:00:00 2001 From: Tibo De Peuter Date: Sun, 20 Oct 2024 15:05:34 +0200 Subject: [PATCH] fix(gitea): Archive overwrite --- scripts/gitea/backup-database-ssh.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/gitea/backup-database-ssh.sh b/scripts/gitea/backup-database-ssh.sh index 1ee69c4..81b382e 100755 --- a/scripts/gitea/backup-database-ssh.sh +++ b/scripts/gitea/backup-database-ssh.sh @@ -107,8 +107,8 @@ ssh "${remote}" "docker exec --env-file '${env_file}' '${database_container}' pg # Copy everything over to local machine. echo 'Info: Copying to local machine.' -ssh "${remote}" "tar -czf '${remote_destination}/${backupfile}' --exclude=${backupfile} ${remote_destination}" -scp "${remote}:${remote_destination}/${backupfile}" "${local_destination}" +ssh "${remote}" "tar -czf '/tmp/${backupfile}' ${remote_destination}" +scp "${remote}:/tmp/${backupfile}" "${local_destination}" # Remove temporary destination on remote host. printf "Debug: Cleaning up '%s' on %s.\n" "${remote_destination}" "${remote}"