|
|
@ -186,13 +186,17 @@ class BackupJob < ::ApplicationJob |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def dump_database!(path) |
|
|
|
def dump_database!(path) |
|
|
|
_out, err, st = Open3.capture3 pg_env, "pg_dump -x -O -f '#{path}'" |
|
|
|
_out, err, st = Open3.capture3 pg_env, dump_command(path) |
|
|
|
|
|
|
|
|
|
|
|
failure! error: err unless st.success? |
|
|
|
failure! error: err unless st.success? |
|
|
|
|
|
|
|
|
|
|
|
st.success? |
|
|
|
st.success? |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def dump_command(output_file_path) |
|
|
|
|
|
|
|
"pg_dump -x -O -f '#{output_file_path}'" |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def success! |
|
|
|
def success! |
|
|
|
payload = download_payload(url_helpers.backups_path(target_project)) |
|
|
|
payload = download_payload(url_helpers.backups_path(target_project)) |
|
|
|
|
|
|
|
|
|
|
|