Re: Best backup strategy for production systems

From: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: "Oliver *EXTERN*" <ofabelo(at)gmail(dot)com>, "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Best backup strategy for production systems
Date: 2014-06-17 12:44:25
Message-ID: A737B7A37273E048B164557ADEF4A58B17D0E1A0@ntex2010i.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Oliver wrote:
> I'm a newbie in postgresql. I've mounted my first postgresql instance, it is empty now, only with
> default postgres DB.
> It is under Linux, with 2 filesystems, one for data and another for archiving (I've enabled archiving
> as it will be for production).
> Could someone recommend me a strategy for backups, scripts and so on?

Please read the documentation:
http://www.postgresql.org/docs/current/static/backup.html
That will make things clear.

The best strategy depends on your needs, like: do you have to restore
to any point in time or how much time do you have to restore a backup?

> Can base backup be done with the system up (postgres up), isn't it?

Yes.

> Would it be ok if I do a base backup each week and archiving backup each day?

Yes, but it will take longer to recover.
Also, if you lose one archived WAL, you cannot restore past that point.

> As I've not configured backups (and archiving deletion), I've had my first problem and it is that my
> archiving filesystem (FS) is full and archiver process is showing "failed" with the last wal file copy
> (normal as archiving FS is full).
> Please, recommend me what I should make now .. I should create another network FS for base backups and
> archiving backups? When I have my first base backup, could I then delete archiving files, isn't it?
> My archiving FS has 20GB, I don't understand as with a system without load (it will be for production,
> but it hasn't databases now .. only postgres), how it full the FS in a few days ... Is it normal?

The amount of WAL generated depends on the write activity on the database,
not on its size. Someone or something must have written a lot.

Yours,
Laurenz Albe

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Oliver 2014-06-19 09:54:21 Re: Best backup strategy for production systems
Previous Message Oliver 2014-06-17 10:20:10 Best backup strategy for production systems