pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedpg_basebackup restore a single table
6+ messages / 5 participants
[nested] [flat]
* pg_basebackup restore a single table
@ 2018-04-11 13:53 camarillo <carlos.amarillo@gmail.com>
0 siblings, 1 reply; 6+ messages in thread
From: camarillo @ 2018-04-11 13:53 UTC (permalink / raw)
To: pgsql-general
Hello how are you?
Currently, I'm doing a basebackup of a postgres instance 9.5 due to the
growth of it, doing a pg_dump took a long time.
Can I do a restore of a single table or single base using the archive
generated for the basebackup without having to delete the filesystem
(/var/lib/pgsql/9.5/*)?.
Thanks,
Carlos
--
Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: pg_basebackup restore a single table
@ 2018-04-11 15:21 Andreas Kretschmer <andreas@a-kretschmer.de>
parent: camarillo <carlos.amarillo@gmail.com>
0 siblings, 2 replies; 6+ messages in thread
From: Andreas Kretschmer @ 2018-04-11 15:21 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
Am 11.04.2018 um 15:53 schrieb camarillo:
> Can I do a restore of a single table or single base using the archive
> generated for the basebackup without having to delete the filesystem
> (/var/lib/pgsql/9.5/*)?.
No, but you can use a spare machine to restore the hole database
(point-in-time-recovery) and restore the table from that using pg_dump
or copy.
Andreas
--
2ndQuadrant - The PostgreSQL Support Company.
www.2ndQuadrant.com
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: pg_basebackup restore a single table
@ 2018-04-11 15:22 Ron <ronljohnsonjr@gmail.com>
parent: Andreas Kretschmer <andreas@a-kretschmer.de>
1 sibling, 2 replies; 6+ messages in thread
From: Ron @ 2018-04-11 15:22 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
On 04/11/2018 10:21 AM, Andreas Kretschmer wrote:
>
>
> Am 11.04.2018 um 15:53 schrieb camarillo:
>> Can I do a restore of a single table or single base using the archive
>> generated for the basebackup without having to delete the filesystem
>> (/var/lib/pgsql/9.5/*)?.
>
> No, but you can use a spare machine to restore the hole database
> (point-in-time-recovery) and restore the table from that using pg_dump or
> copy.
Not everyone has a spare machine and a few TB lying around...
--
Angular momentum makes the world go 'round.
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: pg_basebackup restore a single table
@ 2018-04-11 15:39 Melvin Davidson <melvin6925@gmail.com>
parent: Ron <ronljohnsonjr@gmail.com>
1 sibling, 0 replies; 6+ messages in thread
From: Melvin Davidson @ 2018-04-11 15:39 UTC (permalink / raw)
To: Ron <ronljohnsonjr@gmail.com>; +Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
On Wed, Apr 11, 2018 at 11:22 AM, Ron <ronljohnsonjr@gmail.com> wrote:
>
>
> On 04/11/2018 10:21 AM, Andreas Kretschmer wrote:
>
>>
>>
>> Am 11.04.2018 um 15:53 schrieb camarillo:
>>
>>> Can I do a restore of a single table or single base using the archive
>>> generated for the basebackup without having to delete the filesystem
>>> (/var/lib/pgsql/9.5/*)?.
>>>
>>
>> No, but you can use a spare machine to restore the hole database
>> (point-in-time-recovery) and restore the table from that using pg_dump or
>> copy.
>>
>
> Not everyone has a spare machine and a few TB lying around...
>
> --
> Angular momentum makes the world go 'round.
>
>
*>Can I do a restore of a single table or single base using the archive
>generated for the basebackup ...*
*As Ron has previously stated, this is not possible, but it begs the
question...why not simply do a pg_dump of one table and restore that?*
--
*Melvin Davidson*
*Maj. Database & Exploration Specialist*
*Universe Exploration Command β UXC*
Employment by invitation only!
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: pg_basebackup restore a single table
@ 2018-04-11 15:56 David G. Johnston <david.g.johnston@gmail.com>
parent: Ron <ronljohnsonjr@gmail.com>
1 sibling, 0 replies; 6+ messages in thread
From: David G. Johnston @ 2018-04-11 15:56 UTC (permalink / raw)
To: Ron <ronljohnsonjr@gmail.com>; +Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
On Wed, Apr 11, 2018 at 8:22 AM, Ron <ronljohnsonjr@gmail.com> wrote:
> On 04/11/2018 10:21 AM, Andreas Kretschmer wrote:
>>
>> Am 11.04.2018 um 15:53 schrieb camarillo:
>>
>>> Can I do a restore of a single table or single base using the archive
>>> generated for the basebackup without having to delete the filesystem
>>> (/var/lib/pgsql/9.5/*)?.
>>>
>>
>> No, but you can use a spare machine to restore the hole database
>> (point-in-time-recovery) and restore the table from that using pg_dump or
>> copy.
>>
>
> Not everyone has a spare machine and a few TB lying around..
> β.
>
βThe machine one tests their backup restoration process on should suffice
for this purpose...β
David J.
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: pg_basebackup restore a single table
@ 2018-04-12 19:10 camarillo <carlos.amarillo@gmail.com>
parent: Andreas Kretschmer <andreas@a-kretschmer.de>
1 sibling, 0 replies; 6+ messages in thread
From: camarillo @ 2018-04-12 19:10 UTC (permalink / raw)
To: pgsql-general
Thank you!
--
Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2018-04-12 19:10 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-04-11 13:53 pg_basebackup restore a single table camarillo <carlos.amarillo@gmail.com>
2018-04-11 15:21 ` Andreas Kretschmer <andreas@a-kretschmer.de>
2018-04-11 15:22 ` Ron <ronljohnsonjr@gmail.com>
2018-04-11 15:39 ` Melvin Davidson <melvin6925@gmail.com>
2018-04-11 15:56 ` David G. Johnston <david.g.johnston@gmail.com>
2018-04-12 19:10 ` camarillo <carlos.amarillo@gmail.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