Re: Backup of shut down standby does not work?

From: Dubravko Sever <Dubravko(dot)Sever(at)srce(dot)hr>
To: Jürgen Fuchsberger <juergen(dot)fuchsberger(at)uni-graz(dot)at>, "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Backup of shut down standby does not work?
Date: 2014-02-13 09:07:27
Message-ID: 3A292C84467D6F41BB43EE514A36E232ACC14B05@DOMACI22.intranet2.srce.hr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi,

Do you have recovery.conf and archive command well defined?. Because restore command look for wall files located on slave inside of `/var/postgres-wal/.

Dubravko

--
Dubravko Sever
Sektor za računalne sustave
Sveučilište u Zagrebu, Sveučilišni računski centar (Srce), www.srce.unizg.hr
Dubravko(dot)Sever(at)srce(dot)hr, tel: +385 1 616 5807, fax: +385 1 616 5559

> -----Original Message-----
> From: pgsql-admin-owner(at)postgresql(dot)org [mailto:pgsql-admin-
> owner(at)postgresql(dot)org] On Behalf Of Jürgen Fuchsberger
> Sent: Thursday, February 13, 2014 9:38 AM
> To: pgsql-admin(at)postgresql(dot)org
> Subject: [ADMIN] Backup of shut down standby does not work?
>
> Hi all,
>
> I have a master-slave configuration running the master with WAL archiving
> enabled and the slave in recovery mode reading back the WAL files from the
> master (as described in
> http://www.postgresql.org/docs/9.1/static/continuous-
> archiving.html#BACKUP-PITR-RECOVERY
>
> Now I am doing the following backup strategy:
>
> 1) Stop slave (fast shutdown).
> 2) Rsync to backup fileserver
> 3) Start slave.
>
> I just tried to recover a Backup which *failed* with the following errors:
>
> 2014-02-13 08:34:05 CET LOG: starting archive recovery
> 2014-02-13 08:34:05 CET LOG: incomplete startup packet
> cp: cannot stat `/var/postgres-wal/00000001000001E300000061': No such file
> or directory
> 2014-02-13 08:34:05 CET LOG: could not open file
> "pg_xlog/00000001000001E300000061" (log file 483, segment 97): No such file
> or directory
> 2014-02-13 08:34:05 CET LOG: invalid primary checkpoint record
> cp: cannot stat `/var/postgres-wal/00000001000001E300000060': No such file
> or directory
> 2014-02-13 08:34:05 CET LOG: could not open file
> "pg_xlog/00000001000001E300000060" (log file 483, segment 96): No such file
> or directory
> 2014-02-13 08:34:05 CET LOG: invalid secondary checkpoint record
> 2014-02-13 08:34:05 CET PANIC: could not locate a valid checkpoint record
> 2014-02-13 08:34:06 CET FATAL: the database system is starting up
> 2014-02-13 08:34:06 CET FATAL: the database system is starting up
> 2014-02-13 08:34:07 CET FATAL: the database system is starting up
> 2014-02-13 08:34:07 CET FATAL: the database system is starting up
> 2014-02-13 08:34:07 CET LOG: startup process (PID 16882) was terminated by
> signal 6: Aborted
> 2014-02-13 08:34:08 CET LOG: aborting startup due to startup process failure
>
> So it seems the server is missing the archived WAL files which are not in the
> backup. Some time ago there was a discussion about this
> (http://www.postgresql.org/message-
> id/CAFwQ8rd+oDkLG4KWkux=2jwNinBnuwhY8DH3W-
> _58MGO1m3=Lg(at)mail(dot)gmail(dot)com)
> and it turned out that the WAL archive is not needed, only files in pg_xlog
> which I *did* backup.
>
> So am I doing something wrong or are the WAL files really needed?
>
> Best,
> Juergen

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Theodotos Andreou 2014-02-13 10:09:22 Re: Error: pid file is invalid, please manually kill the stale server process.
Previous Message Luca Ferrari 2014-02-13 08:39:00 Re: Error: pid file is invalid, please manually kill the stale server process.