pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
File removed while backup is running
3+ messages / 2 participants
[nested] [flat]

* File removed while backup is running
@ 2015-05-21 07:04  Mario Aguado <marioa.es@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Mario Aguado @ 2015-05-21 07:04 UTC (permalink / raw)
  To: pgsql-admin

Hi,

I have two postgres cluster in 9.4 version and all run backups correctly.
Recently I add a new cluster and the backup doesn't 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 don't 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

I'm looking for this error but i didn't found any.


Any idea?


Thanks in advance.

Regards.

Mario

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: File removed while backup is running
@ 2015-05-21 07:16  Jan Lentfer <Jan.Lentfer@web.de>
  parent: Mario Aguado <marioa.es@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Jan Lentfer @ 2015-05-21 07:16 UTC (permalink / raw)
  To: pgsql-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



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: File removed while backup is running
@ 2015-05-21 07:57  Mario Aguado <marioa.es@gmail.com>
  parent: Jan Lentfer <Jan.Lentfer@web.de>
  0 siblings, 0 replies; 3+ messages in thread

From: Mario Aguado @ 2015-05-21 07:57 UTC (permalink / raw)
  To: Jan Lentfer <Jan.Lentfer@web.de>; +Cc: pgsql-admin

Thanks Jan

I read your links and It solve the errors.

Regards.

Mario

2015-05-21 9:16 GMT+02:00 Jan Lentfer <Jan.Lentfer@web.de>:

> 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
>

^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2015-05-21 07:57 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-05-21 07:04 File removed while backup is running Mario Aguado <marioa.es@gmail.com>
2015-05-21 07:16 ` Jan Lentfer <Jan.Lentfer@web.de>
2015-05-21 07:57   ` Mario Aguado <marioa.es@gmail.com>

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