Skip to content

Commit

Permalink
feat: Another UNPACK_CMD fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan Christie committed Jul 4, 2024
1 parent fc52fdd commit 86fca56
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sql-recovery/recovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,8 @@ def error(error_no):
# database admin users must be the same.
UNPACK_CMD = "gunzip -c %s" % BACKUP_FILE
UNPACK_CMD += " | "
UNPACK_CMD += "egrep -v \"(CREATE|DROP) ROLE IF EXISTS %s;" % PGUSER
UNPACK_CMD += "egrep -v \"DROP ROLE IF EXISTS %s;" % PGUSER
UNPACK_CMD += "|CREATE ROLE %s;" % PGUSER
UNPACK_CMD += "|DROP DATABASE template1;"
UNPACK_CMD += "|CREATE DATABASE template1 WITH TEMPLATE = template0 ENCODING = 'SQL_ASCII' LOCALE = 'C';\""
UNPACK_CMD += " > %s/dumpall.sql" % RECOVERY_ROOT_DIR
Expand Down

0 comments on commit 86fca56

Please sign in to comment.