From cdf08197eaa823cba03997b83ded43a8136e4886 Mon Sep 17 00:00:00 2001 From: Fuhu Xia Date: Fri, 19 Aug 2022 18:11:47 -0400 Subject: [PATCH] clean before restore --- docs/fcs_migration/02-fcs-catalog-db-restore.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/fcs_migration/02-fcs-catalog-db-restore.sh b/docs/fcs_migration/02-fcs-catalog-db-restore.sh index 1ccadba..ab6e2ff 100755 --- a/docs/fcs_migration/02-fcs-catalog-db-restore.sh +++ b/docs/fcs_migration/02-fcs-catalog-db-restore.sh @@ -53,7 +53,7 @@ EOF # Restore backup restore_id=$$ -time cf run-task backup-manager --name "catalog-restore-$restore_id" --command "PG_RESTORE_OPTIONS='--no-acl' restore psql $catalog_db_migrate $backup_path" +time cf run-task backup-manager --name "catalog-restore-$restore_id" --command "PG_RESTORE_OPTIONS='--if-exists --clean --no-acl' restore psql $catalog_db_migrate $backup_path" # This job may return "FAILED", and may not return successfully wait_for "catalog-restore-$restore_id"