Re: [pgadmin-support] Best backup strategy for production systems

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Oliver <ofabelo(at)gmail(dot)com>
Cc: Andreas <maps(dot)on(at)gmx(dot)net>, "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>, Forums postgresql <pgsql-general(at)postgresql(dot)org>
Subject: Re: [pgadmin-support] Best backup strategy for production systems
Date: 2014-06-29 12:28:36
Message-ID: CAB7nPqRt-MF=K9TO7g4zj8LF=f-Y=PuvLr_5UbAq9QtwaQHCEA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support pgsql-admin pgsql-general

On Fri, Jun 27, 2014 at 9:55 PM, Oliver <ofabelo(at)gmail(dot)com> wrote:

> Thank you very much for your reply.
> I've spoken with my boss, databases aren't so important, so if there is a
> little of data lost, there isn't problem .. so I'm configuring this with
> continuous archiving and base backups. If you are expert, please, I would
> like make you some questions ..
> I only have a server (there isn't slave server). I have doing continuous
> archiving to another filesystem (of other physical disks), I think that it
> is working well .. One question is, original wal files are keeped how many
> time?
>
2 days? I only have control archived wal files, about how many time I want
> keep them, isn't it?
>

> When I do a base backup, is it normal that it doesn't copy pg_xlog data,
> isn't? Because it is doing continuous archiving :-?
>
A base backup can be used as-is with the archived WAL files that it can use
for recovery.

> The command that I'm using is (I would like that it copies all
> tablespaces, but I'm not sure if it is doing it):
> pg_basebackup -D 27062014 -Ft -z -Z 5 -l "base_backup_27062014" -P
>
A base backup taken in tar format creates a set of tarballs: one for the
base (base tablespace with configuration file, etc.) and one for each
tablespace named with the OID of the tablespace. It is actually better to
use a tar format as plain format will try to link to existing folders when
taking a base backup on the same server as the node it is connecting to if
this server has extra tablespaces.

> Output:
>
> 20290/20290 kB (100%), 1/1 tablespace
> NOTICE: pg_stop_backup completado, todos los segmentos de WAL requeridos
> han sido archivados
>
> I have now only default databases (postgres and templates), is it normal
> that it puts only 1/1 tablespace?
>
Yes.

> Why it says that all required wal segmens have been archived if continuous
> archiving is enabled?
>
It is necessary to perform a WAL file switch when calling pg_stop_backup to
ensure that all the necessary WAL files for the backup have been archived.
--
Michael

In response to

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message Dmitriy Olshevskiy 2014-06-29 19:25:06 Re: [pgadmin-support] Character[] field value are truncated
Previous Message Emanuele Sottocorno 2014-06-29 12:24:11 Character[] field value are truncated

Browse pgsql-admin by date

  From Date Subject
Next Message Oliver 2014-06-30 10:24:26 Re: [pgadmin-support] Best backup strategy for production systems
Previous Message bricklen 2014-06-27 21:35:00 Re: Wal archive way behind in streaming replication

Browse pgsql-general by date

  From Date Subject
Next Message Bob Jolliffe 2014-06-30 08:05:18 Very high latency, low bandwidth replication
Previous Message Ben Ellis 2014-06-29 01:10:51 Examples of projects that use Postgres "as API server"