kartoza / docker-pg-backup

A cron job that will back up databases running in a docker postgres container
GNU General Public License v2.0
452 stars 103 forks source link

restore.sh error #32

Closed marceloleiva closed 3 years ago

marceloleiva commented 4 years ago

Hello, Getting the following error when trying to restore a backup.

Command docker-compose exec postgres_backup /restore.sh

Error

TARGET_DB: sis_db
WITH_POSTGIS: 
TARGET_ARCHIVE: backups/2020/June/LOCAL_sis_db.15-June-2020.dmp
Dropping target DB
Recreate target DB without POSTGIS
Restoring dump file
SET
SET
SET
psql:/backups/globals.sql:14: ERROR:  role "postgres" already exists
ALTER ROLE
psql:/backups/globals.sql:16: ERROR:  role "replicator" already exists
ALTER ROLE
psql:/backups/globals.sql:18: ERROR:  role "sis" already exists
ALTER ROLE
pg_restore: error: one of -d/--dbname and -f/--file must be specified

macOS Catalina Docker version 19.03.8, build afacb8b docker-compose version 1.25.5, build 8a1c60f6 kartoza/postgis:12.1 kartoza/docker-pg-backup/tree/master