pg.ddx.io pgsql-general@postgresql.org mailing list archivehelp / color / mirror / Atom feed
migration of 100+ tables 4+ messages / 2 participants [nested] [flat]
* migration of 100+ tables @ 2019-03-11 00:53 Julie Nishimura <juliezain@hotmail.com> 2019-03-11 01:28 ` Re: migration of 100+ tables Adrian Klaver <adrian.klaver@aklaver.com> 0 siblings, 1 reply; 4+ messages in thread From: Julie Nishimura @ 2019-03-11 00:53 UTC (permalink / raw) To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org> Hello friends, I will need to migrate 500+ tables from one server (8.3) to another (9.3). I cannot dump and load the entire database due to storage limitations (because the source is > 20 TB, and the target is about 1.5 TB). I was thinking about using pg_dump with customized -t flag, then use restore. The table names will be in the list, or I could dump their names in a table. What would be your suggestions on how to do it more efficiently? Thank you for your ideas, this is great to have you around, guys! ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: migration of 100+ tables 2019-03-11 00:53 migration of 100+ tables Julie Nishimura <juliezain@hotmail.com> @ 2019-03-11 01:28 ` Adrian Klaver <adrian.klaver@aklaver.com> 2019-03-11 04:07 ` Re: migration of 100+ tables Julie Nishimura <juliezain@hotmail.com> 0 siblings, 1 reply; 4+ messages in thread From: Adrian Klaver @ 2019-03-11 01:28 UTC (permalink / raw) To: Julie Nishimura <juliezain@hotmail.com>; pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org> On 3/10/19 5:53 PM, Julie Nishimura wrote: > Hello friends, I will need to migrate 500+ tables from one server (8.3) > to another (9.3). I cannot dump and load the entire database due to > storage limitations (because the source is > 20 TB, and the target is > about 1.5 TB). > > I was thinking about using pg_dump with customized -t flag, then use > restore. The table names will be in the list, or I could dump their > names in a table. What would be your suggestions on how to do it more > efficiently? The sizes you mention above, are they for the uncompressed raw data? Are the tables all in one schema or multiple? Where I am going with this is pg_dump -Fc --schema. See: https://www.postgresql.org/docs/10/app-pgrestore.html The pg_restore -l to get a TOC(Table of Contents). Comment out the items you do not want in the TOC. Then pg_restore --use-list. See: https://www.postgresql.org/docs/10/app-pgrestore.html > > Thank you for your ideas, this is great to have you around, guys! > > -- Adrian Klaver adrian.klaver@aklaver.com ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: migration of 100+ tables 2019-03-11 00:53 migration of 100+ tables Julie Nishimura <juliezain@hotmail.com> 2019-03-11 01:28 ` Re: migration of 100+ tables Adrian Klaver <adrian.klaver@aklaver.com> @ 2019-03-11 04:07 ` Julie Nishimura <juliezain@hotmail.com> 2019-03-11 04:15 ` Re: migration of 100+ tables Adrian Klaver <adrian.klaver@aklaver.com> 0 siblings, 1 reply; 4+ messages in thread From: Julie Nishimura @ 2019-03-11 04:07 UTC (permalink / raw) To: Adrian Klaver <adrian.klaver@aklaver.com>; pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org> Oh, this is great news! Yay, thanks! ________________________________ From: Adrian Klaver <adrian.klaver@aklaver.com> Sent: Sunday, March 10, 2019 6:28 PM To: Julie Nishimura; pgsql-general@lists.postgresql.org Subject: Re: migration of 100+ tables On 3/10/19 5:53 PM, Julie Nishimura wrote: > Hello friends, I will need to migrate 500+ tables from one server (8.3) > to another (9.3). I cannot dump and load the entire database due to > storage limitations (because the source is > 20 TB, and the target is > about 1.5 TB). > > I was thinking about using pg_dump with customized -t flag, then use > restore. The table names will be in the list, or I could dump their > names in a table. What would be your suggestions on how to do it more > efficiently? The sizes you mention above, are they for the uncompressed raw data? Are the tables all in one schema or multiple? Where I am going with this is pg_dump -Fc --schema. See: https://www.postgresql.org/docs/10/app-pgrestore.html The pg_restore -l to get a TOC(Table of Contents). Comment out the items you do not want in the TOC. Then pg_restore --use-list. See: https://www.postgresql.org/docs/10/app-pgrestore.html > > Thank you for your ideas, this is great to have you around, guys! > > -- Adrian Klaver adrian.klaver@aklaver.com ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: migration of 100+ tables 2019-03-11 00:53 migration of 100+ tables Julie Nishimura <juliezain@hotmail.com> 2019-03-11 01:28 ` Re: migration of 100+ tables Adrian Klaver <adrian.klaver@aklaver.com> 2019-03-11 04:07 ` Re: migration of 100+ tables Julie Nishimura <juliezain@hotmail.com> @ 2019-03-11 04:15 ` Adrian Klaver <adrian.klaver@aklaver.com> 0 siblings, 0 replies; 4+ messages in thread From: Adrian Klaver @ 2019-03-11 04:15 UTC (permalink / raw) To: Julie Nishimura <juliezain@hotmail.com>; pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org> On 3/10/19 9:07 PM, Julie Nishimura wrote: > Oh, this is great news! Yay, thanks! Just be aware, where -n = --schema: https://www.postgresql.org/docs/10/app-pgdump.html " Note When -n is specified, pg_dump makes no attempt to dump any other database objects that the selected schema(s) might depend upon. Therefore, there is no guarantee that the results of a specific-schema dump can be successfully restored by themselves into a clean database. " So any relationships across schema will not be preserved. > > ------------------------------------------------------------------------ > *From:* Adrian Klaver <adrian.klaver@aklaver.com> > *Sent:* Sunday, March 10, 2019 6:28 PM > *To:* Julie Nishimura; pgsql-general@lists.postgresql.org > *Subject:* Re: migration of 100+ tables > On 3/10/19 5:53 PM, Julie Nishimura wrote: >> Hello friends, I will need to migrate 500+ tables from one server (8.3) >> to another (9.3). I cannot dump and load the entire database due to >> storage limitations (because the source is > 20 TB, and the target is >> about 1.5 TB). >> >> I was thinking about using pg_dump with customized -t flag, then use >> restore. The table names will be in the list, or I could dump their >> names in a table. What would be your suggestions on how to do it more >> efficiently? > > The sizes you mention above, are they for the uncompressed raw data? > > Are the tables all in one schema or multiple? > > Where I am going with this is pg_dump -Fc --schema. > > See: > https://www.postgresql.org/docs/10/app-pgrestore.html > > The pg_restore -l to get a TOC(Table of Contents). > > Comment out the items you do not want in the TOC. > > Then pg_restore --use-list. > > See: > > https://www.postgresql.org/docs/10/app-pgrestore.html > >> >> Thank you for your ideas, this is great to have you around, guys! >> >> > > > -- > Adrian Klaver > adrian.klaver@aklaver.com -- Adrian Klaver adrian.klaver@aklaver.com ^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2019-03-11 04:15 UTC | newest] Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2019-03-11 00:53 migration of 100+ tables Julie Nishimura <juliezain@hotmail.com> 2019-03-11 01:28 ` Adrian Klaver <adrian.klaver@aklaver.com> 2019-03-11 04:07 ` Julie Nishimura <juliezain@hotmail.com> 2019-03-11 04:15 ` Adrian Klaver <adrian.klaver@aklaver.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox