From: Peter J. Holzer <hjp-pgsql@hjp.at>
To: pgsql-general@lists.postgresql.org
Subject: Re: Inherited an 18TB DB & need to backup
Date: Sat, 16 May 2020 16:12:37 +0200
Message-ID: <20200516141237.GC8152@hjp.at> (raw)
In-Reply-To: <20200515130246.GB25570@campbell-lange.net>
References: <CAA7EztXsnSSMv7u85Hx1mNYZK23moFcQ5q5aZ1fUBT76NCB1UQ@mail.gmail.com>
<20200515130246.GB25570@campbell-lange.net>
On 2020-05-15 14:02:46 +0100, Rory Campbell-Lange wrote:
> On 15/05/20, Suhail Bamzena (suhailsalem@gmail.com) wrote:
> > I have very recently inherited an 18 TB DB that is running version 9.2.
> > Apparently this database has never been backed up
[...]
> A very simple solution could be just to dump the database daily with
> pg_dump, if you have the space and machine capacity to do it. Depending
> on what you are storing, you can achieve good compression with this, and
> it is a great way of having a simple file from which to restore a
> database.
>
> Our ~200GB cluster resolves to under 10GB of pg_dump files, although
> 18TB is a whole different order of size.
I love pg_dump (especially the -Fd format), but for a database of that
size it might be too slow. Ours is about 1TB, and «pg_dump --compress=5 -Fd»
takes a bit over 2 hours. Extrapolating to 18 TB that would be 40 hours
...
And restoring the database takes even more time because it only restores
the tables and has to rebuild the indexes.
Still - for a first backup, just firing off pg_dump might be the way to
go. Better to have a backup in two days than still none after two weeks
because you are still evaluating the fancier alternatives.
hp
--
_ | Peter J. Holzer | Story must make more sense than reality.
|_|_) | |
| | | hjp@hjp.at | -- Charles Stross, "Creative writing
__/ | http://www.hjp.at/ | challenge!"
Attachments:
signature.asc (application/pgp-signature, 832B) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: hjp-pgsql@hjp.at
Subject: Re: Inherited an 18TB DB & need to backup
In-Reply-To: <20200516141237.GC8152@hjp.at>
References: <CAA7EztXsnSSMv7u85Hx1mNYZK23moFcQ5q5aZ1fUBT76NCB1UQ@mail.gmail.com> <20200515130246.GB25570@campbell-lange.net> <20200516141237.GC8152@hjp.at>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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