Commit a5f5b3e5 authored by Toon Claes's avatar Toon Claes

Merge branch 'sh-add-if-exists-pgdump' into 'master'

Add --if-exists to pg_dump command-line in backup creation

See merge request gitlab-org/gitlab!40792
parents 85d475bf 87d3a5bb
---
title: Add --if-exists to pg_dump command-line in backup creation
merge_request: 40792
author:
type: other
......@@ -27,6 +27,7 @@ module Backup
progress.print "Dumping PostgreSQL database #{config['database']} ... "
pg_env
pgsql_args = ["--clean"] # Pass '--clean' to include 'DROP TABLE' statements in the DB dump.
pgsql_args << '--if-exists'
if Gitlab.config.backup.pg_schema
pgsql_args << '-n'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment