Re: Use tar to online backup has an error

From: Yves Dorfsman <yves(at)zioup(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Use tar to online backup has an error
Date: 2015-09-24 13:29:01
Message-ID: 5603FA9D.9030609@zioup.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 filesystem backup 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Willy-Bas Loos 2015-09-24 13:42:47 epoch and timezone changed bevior
Previous Message Melvin Davidson 2015-09-24 12:51:36 Re: Convert number to string