Error in creating SEQUENCEs when restoring the PostgreSQL database

后端 未结 2 2124
梦谈多话
梦谈多话 2020-12-17 15:23

UserX has following grants:

CREATE ROLE \"UserX\" LOGIN PASSWORD \'pass\';
CREATE DATABASE \"DBX\" WITH OWNER=\"UserX\" ENCODING=\'UTF8\' TABLESPACE         


        
2条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-17 16:10

    I have taken these notes:

    SUPPORT ALL COMPRESSED DATABASE

    pg_dump -U {usuario} -h {host} -W {database} | gzip -c > archivo.gz

    RESTORE FROM BACK GZIP

    gunzip -c {archivo.gz} | psql -h {host} -U postgres {database}

    RESTORE FROM GZIP BACKUP FROM v10 to v9.x

    gunzip -c {archivo.gz} | sed -e '/AS integer/d' | psql -U postgres -h {host} -W {database}

提交回复
热议问题