Skip to content

[Feat.] backup script can now expand the files.tar.gz backup in a remote server - #156

Open
cgbautista wants to merge 4 commits into
masterfrom
feature/new_single_backup_and_process_on_remote_server
Open

[Feat.] backup script can now expand the files.tar.gz backup in a remote server#156
cgbautista wants to merge 4 commits into
masterfrom
feature/new_single_backup_and_process_on_remote_server

Conversation

@cgbautista

Copy link
Copy Markdown
Contributor

Added a new flag to be able to use the same name for that file each time, so only a single backup has to be managed (as the new backup system is used instead)

remote server.
Added a new flag to be able to use the same name for that file each
time, so only a single backup has to be managed (as the new backup
      system is used instead)
@cgbautista
cgbautista requested a review from idelcano November 5, 2025 15:48
Comment thread DHIS2/backups/backup_tomcat_instance.sh Outdated
fi
log "expand files backup into ${DB_REMOTE_DEST_SERVER}..."

ssh ${DB_REMOTE_DEST_SERVER} "${remote_expand_script} -i \"${files_path}\" -o \"${dump_remote_dest_folder}\" 2>&1 | tee -a \"${remote_log}\" "

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi @cgbautista the script is good for me, but looking in depth the PR with codex, it suggest me a addition here:

Small suggestion: let’s add set -o pipefail; before the pipeline in the remote SSH command, so the overall command fails if remote_expand_script fails (not just tee).

From:
ssh ${DB_REMOTE_DEST_SERVER} "${remote_expand_script} -i "${files_path}" -o "${dump_remote_dest_folder}" 2>&1 | tee -a "${remote_log}" "

To:
ssh ${DB_REMOTE_DEST_SERVER} "set -o pipefail; ${remote_expand_script} -i "${files_path}" -o "${dump_remote_dest_folder}" 2>&1 | tee -a "${remote_log}" "

what do you think?

@idelcano idelcano left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @cgbautista

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants