| From: | Scott Mead <scott(dot)lists(at)enterprisedb(dot)com> |
|---|---|
| To: | cbarnes(at)recognia(dot)com |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Postgres online backup and restore |
| Date: | 2009-07-01 00:35:16 |
| Message-ID: | d3ab2ec80906301735sebb815dxe04169f3df40e24c@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On Thu, Jun 25, 2009 at 9:40 AM, Chris Barnes <cbarnes(at)recognia(dot)com> wrote:
> Sorry if posting twice, wasn’t part of general when sent and didn’t see
> it received by group.
>
> I started an online backup of postgres, tar’d my data folder, copy to usb
> drive in production
> and restored it into my RC environment. Have I missed something important?
>
> Online Backup
>
> psql
>
> checkpoint;
>
> SELECT pg_switch_xlog();
>
> SELECT pg_start_backup('postres_full_backup_June222009');
>
> tar -czvf pgprd01_June22_2009_production.dmp.tar.gz data/
>
> SELECT pg_stop_backup();
>
> Restore
>
> tar –xzvf pgprd01_June22_2009_production.dmp.tar.gz
>
>
>
> When starting the database I receive many errors that look like the backup
> was corrupted.
>
You missed the all-important step of also taking your archived log files to
the remote environment and creating the recovery.conf file:
http://www.postgresql.org/docs/8.3/static/continuous-archiving.html
Note section 24.3.3.1
--Scott
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Craig Ringer | 2009-07-01 07:43:51 | Re: [Fwd: Re: Python client + select = locked resources???] |
| Previous Message | Scott Mead | 2009-07-01 00:05:04 | Re: Postgres online backup and restore |