Re: backup to partitioned table

Поиск
Список
Период
Сортировка
От Scott Ribe
Тема Re: backup to partitioned table
Дата
Msg-id DD0761A0-7FBA-4EF4-BDAF-5BAE55553C64@elevated-dev.com
обсуждение исходный текст
Ответ на backup to partitioned table  (Erik Serrano <eserranos@gmail.com>)
Ответы Re: backup to partitioned table  (Erik Serrano <eserranos@gmail.com>)
Список pgsql-admin
> On Nov 16, 2022, at 8:56 AM, Erik Serrano <eserranos@gmail.com> wrote:
>
> Hello Guys,
> I have a case that I would like you to help me with.
>
> I have a partitioned table in postgresql version 9,5 to which I select and it returns data perfectly, but when I want
tomake a backup of the table, it only saves the structure without records. 
> It should be noted that I am not making a backup of the structure, but of the data or complete, but it does not back
upthe data anyway. 
> When consulting the administrator, he informs me that it is a partitioned table and that it is always zero, but the
datais in its "daughter" tables and that the select that it returns is the information that is housed in all its
daughtertables. 
>
> Now, given this, I wanted to know if there is any way to make a backup of the table that throws all the data from its
childtables into a flat file. 
>
> Is it possible to perform this action?
> From already thank you very much

You have to dump all the child tables; usually partitions are named reasonably such that a wildcard can do it:

pg_dump -t root_table_name\* > backup.sql

You don't exactly get a "flat" backup, as all the individual tables are included, but you do get it all into one file,
ifthat's good enough for you. 


В списке pgsql-admin по дате отправления:

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: backup to partitioned table
Следующее
От: Ron
Дата:
Сообщение: Re: backup to partitioned table