fix: Update postgres exlcude table data

This commit is contained in:
Gavin D'souza 2020-10-09 11:19:16 +05:30
parent 44a09191b3
commit 368a031da3
2 changed files with 2 additions and 2 deletions

View file

@ -72,7 +72,7 @@ def exists_in_backup(doctypes, file):
bool: True if all tables exist
"""
predicate = (
'CREATE TABLE public."tab{}"'
'COPY public."tab{}"'
if frappe.conf.db_type == "postgres"
else "CREATE TABLE `tab{}`"
)

View file

@ -357,7 +357,7 @@ class BackupGenerator:
)
elif self.backup_excludes:
args["exclude"] = " ".join(
["--exclude-table='{0}'".format(table) for table in self.backup_excludes]
["--exclude-table-data='public.\"{0}\"'".format(table) for table in self.backup_excludes]
)
cmd_string = (