pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jan Lentfer <Jan.Lentfer@web.de>
To: pgsql-admin@postgresql.org
Subject: Re: File removed while backup is running
Date: Thu, 21 May 2015 09:16:17 +0200
Message-ID: <96a0ca326b635cb1121b60605297c453@imap.lan.net> (raw)
In-Reply-To: <CAG59ottwgmaYWBBszozxDQK4SsUS2iEUz2JhUsPacEvq-CQs1Q@mail.gmail.com>
References: <CAG59ottwgmaYWBBszozxDQK4SsUS2iEUz2JhUsPacEvq-CQs1Q@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>

Hi,

that is generally not a problem. _fsm  is the "Free Space Map" file 
(http://www.postgresql.org/docs/9.4/static/storage-fsm.html). It's OK 
and normal, that files change or even disappear within PGDATA directory 
during backup - because the Postgres cluster is still operational. Those 
changes end up in the WAL files and that is why you need those from the 
start of the backup. This is also described in the manual:

"Some file system backup tools emit warnings or errors if the files 
they are trying to copy change while the copy proceeds. When taking a 
base backup of an active database, this situation is normal and not an 
error. However, you need to ensure that you can distinguish complaints 
of this sort from real errors. For example, some versions of rsync 
return a separate exit code for "vanished source files", and you can 
write a driver script to accept this exit code as a non-error case. 
Also, some versions of GNU tar return an error code indistinguishable 
from a fatal error if a file was truncated while tar was copying it. 
Fortunately, GNU tar versions 1.16 and later exit with 1 if a file was 
changed during the backup, and 2 for other errors. With GNU tar version 
1.23 and later, you can use the warning options 
--warning=no-file-changed --warning=no-file-removed to hide the related 
warning messages."

http://www.postgresql.org/docs/9.4/interactive/continuous-archiving.html#BACKUP-LOWLEVEL-BASE-BACKUP


hth

Jan

Am 2015-05-21 09:04, schrieb Mario Aguado:
> Hi,
>
> I have two postgres cluster in 9.4 version and all run backups
> correctly. Recently I add a new cluster and the backup doesnt work on
> it. 
>
> All databases have archive_mode = on and wal_level=archive
>
> My backup has this steeps:
>  
> SELECT pg_start_backup(${clustername});"
> tar PGDATA and TABLESPACES
> Select pg_stop_backup();
> tar WAL files
>
> With this database when I run backup I get errors like:
>
> t3_28961_fsm: File removed before we read it
>
> I dont know what file type is t3_28961_fsm.
>
> If I go to tablespace dir i have several t files and this file types
> are adding and removing continously.
>
> -rw------- 1 postgres postgres 8.0K May 21 09:01 t3_29094
> -rw------- 1 postgres postgres    0 May 21 09:01 t3_29087
> -rw------- 1 postgres postgres 8.0K May 21 09:01 t3_29093
>
> Im looking for this error but i didnt found any.
>
> Any idea?
>
> Thanks in advance.
>
> Regards.
>
> Mario



-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



view thread (3+ messages)  latest in thread

Message-ID: <96a0ca326b635cb1121b60605297c453@imap.lan.net>
Permalink:  ../96a0ca326b635cb1121b60605297c453@imap.lan.net/
Also on:    postgresql.org/message-id/96a0ca326b635cb1121b60605297c453@imap.lan.net

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: Jan.Lentfer@web.de
  Subject: Re: File removed while backup is running
  In-Reply-To: <96a0ca326b635cb1121b60605297c453@imap.lan.net>

* 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