简体   繁体   中英

restore specific db issue using pgbackrest

I have a question about how to backup a specific Database using pgbackrest: the problem is when I tried to restore a selected db using --include-db option of pgbackrest i got just the selected db and built-in databases(postgres, template0 and template1) restored, and when i tried to connect another db after the restore I got this error :

**FATAL: relation mapping file "base/24581/pg_filenode.map" contains invalid data
Previous connection kept**

is there any solution that allows the restore of the whole db with the selected one without losing the other databases ??

Thank you

I don't think this is possible according to the documentation of Include Database option:

Include Database Option (--db-include) Restore only specified databases. This feature allows only selected databases to be restored. Databases not specifically included will be restored as sparse, zeroed files to save space but still allow PostgreSQL to perform recovery. After recovery the databases that were not included will not be accessible but can be removed with the drop database command. NOTE: built-in databases (template0, template1, and postgres) are always restored.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM