Re: Use tar to online backup has an error - Mailing list pgsql-general

From Yves Dorfsman
Subject Re: Use tar to online backup has an error
Date
Msg-id 5603FA9D.9030609@zioup.com
Whole thread Raw
In response to Use tar to online backup has an error  (maxiangqian <maxiangqian@gmail.com>)
Responses Re: Use tar to online backup has an error
List pgsql-general
On 2015-09-24 03:55, maxiangqian wrote:

> when I use tar to online backup ,It has an error:
>
> /bin/tar: Removing leading `/' from member names

This is not an error, more like a warning. GNU tar doesn't not store the full path in the tar file, but a relative
path,as full paths are considered dangerous (easier to overwrite existing data by mistake). 


> /bin/tar: /data/test/PG_9.0_201008051/20001/24500001: Cannot stat: No such
> file or directory
>
> /bin/tar: Error exit delayed from previous errors
>
>
> and /data/test/PG_9.0_201008051/20001/24500001 file is not exist.
>

It looks like you are trying to make a filesystem backup while the files are still being updated. In order to make a
filesystembackup you need to either: 

  - shutdown the database
  - run "pg_start_backup" (make SURE that you run pg_stop_backup" when done)

http://www.postgresql.org/docs/9.3/static/backup-file.html
http://www.postgresql.org/docs/9.3/static/continuous-archiving.html#BACKUP-TIPS


--
http://yves.zioup.com
gpg: 4096R/32B0F416



pgsql-general by date:

Previous
From: Melvin Davidson
Date:
Subject: Re: Convert number to string
Next
From: Willy-Bas Loos
Date:
Subject: epoch and timezone changed bevior