]>
git.immae.eu Git - perso/Immae/Projets/Puppet.git/blob - modules/profile/templates/postgresql/backup_psql.sh.erb
6 /usr
/bin
/psql
-h <%= @pg_path
%><%= @pg_port_arg
%> -c "SELECT pg_wal_replay_resume();" >/dev
/null
|| echo "impossible to resume replication"
9 trap resume_replication EXIT
11 /usr
/bin
/psql
-h <%= @pg_path
%><%= @pg_port_arg
%> -c "SELECT pg_wal_replay_pause();" >/dev
/null
|| (echo "impossible to pause replication" && false
)
13 /usr
/bin
/pg_dumpall
-h <%= @pg_path
%><%= @pg_port_arg
%> -f <%= @pg_backup_path
%>/$(date -Iseconds).sql