Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax problem with cron wal-g command #658

Merged
merged 4 commits into from
May 26, 2024
Merged

Conversation

garry-t
Copy link
Contributor

@garry-t garry-t commented May 13, 2024

Fix syntax issue inside cron file #657
Plus fix problem with wal-g run, config file now specified in command directly.

This is a simplest solution I found. Minimum changes required, but now it works

Fix syntax issue inside cron file. Plus fix problem with wal-g run, config file now specified in command
attempt to fix tests
@garry-t garry-t marked this pull request as draft May 14, 2024 14:37
@vitabaks
Copy link
Owner

vitabaks commented May 24, 2024

@garry-t why not simplify the check for the same as for pgbackrest?

if [ $(psql -tAXc 'select pg_is_in_recovery()') = 'f' ]; then wal-g backup-push {{ postgresql_data_dir }} > {{ postgresql_log_dir }}/walg_backup.log 2>&1; fi

or

[ $(psql -tAXc 'select pg_is_in_recovery()') = 'f' ] && wal-g backup-push {{ postgresql_data_dir }} > {{ postgresql_log_dir }}/walg_backup.log 2>&1

I don't see the need for different approaches.

@garry-t
Copy link
Contributor Author

garry-t commented May 25, 2024

@garry-t why not simplify the check for the same as for pgbackrest?

if [ $(psql -tAXc 'select pg_is_in_recovery()') = 'f' ]; then wal-g backup-push {{ postgresql_data_dir }} > {{ postgresql_log_dir }}/walg_backup.log 2>&1; fi

or

[ $(psql -tAXc 'select pg_is_in_recovery()') = 'f' ] && wal-g backup-push {{ postgresql_data_dir }} > {{ postgresql_log_dir }}/walg_backup.log 2>&1

I don't see the need for different approaches.

I kept solution closer to original. Will check your suggestion.

review comment fix
fixed assert for wal-g
@vitabaks vitabaks marked this pull request as ready for review May 26, 2024 10:31
@vitabaks vitabaks merged commit 8c70899 into vitabaks:master May 26, 2024
17 checks passed
@garry-t garry-t deleted the issue-657 branch May 26, 2024 17:59
dtrdnk pushed a commit to dtrdnk/postgresql_cluster that referenced this pull request Jun 16, 2024
@rrrru
Copy link
Contributor

rrrru commented Jun 23, 2024

Debian bookworm
/bin/sh: 1: wal-g: not found

I think I should use the full path, like /usr/local/bin/wal-g

@vitabaks
Copy link
Owner

Feel free to suggest a PR.

@rrrru
Copy link
Contributor

rrrru commented Jun 23, 2024

#679

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.

3 participants