On Tue, Nov 28, 2017 at 7:23 AM, VENKTESH GUTTEDAR <
venkteshgutte...@gmail.com> wrote:

> Hello All,
>
>
>     I have run CREATE SCHEMA xyz accidentally, and it replaced my existing
> schema (xyz) with tables, and i have lost all my data.
>
>     Is there any way to rollback or get the schema back with old tables
> and data.
>
>     Any help would be appreciated.
>
> --
> Regards :
> Venktesh Guttedar.
>
>
*>Is there any way to rollback or get the schema back with old tables and
data.*

*Hopefully you have a pg_dump of the database or schema.*
*If it in in plain format, you can edit the dump and recover the tables
that way.*

*If it is in custom format, you can use the -l option to list and edit,
then restore with -L option.*


*https://www.postgresql.org/docs/9.6/static/app-pgrestore.html
<https://www.postgresql.org/docs/9.6/static/app-pgrestore.html>*

*Otherwise, your next option would be trying to use PITR recovery,
providing you have available WAL files.*


*https://www.postgresql.org/docs/9.6/static/continuous-archiving.html
<https://www.postgresql.org/docs/9.6/static/continuous-archiving.html>*

-- 
*Melvin Davidson*
I reserve the right to fantasize.  Whether or not you
wish to share my fantasy is entirely up to you.

Reply via email to