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}"