Thread: Backup issues

Backup issues

From
RP Khare
Date:
I never used PostgreSQL in production environment. Now I got an opportunity to migrate a MySQL production database to PostgreSQL. Before migrating, I have few queries on data recovery:

  1. Is there any feature of scheduled backups?
  2. In case there is no backup and I want to shift my data files to a new PC, how to do that?
  3. Are the Redo Logs enabled by default?

Regards,
Rohit Prakash


Manage your finance and manage money through MSN Money Special Drag n' drop

Re: Backup issues

From
"Joshua D. Drake"
Date:
On Fri, 2010-06-25 at 23:24 +0530, RP Khare wrote:
> I never used PostgreSQL in production environment. Now I got an
> opportunity to migrate a MySQL production database to PostgreSQL.
> Before migrating, I have few queries on data recovery:
>
>      1. Is there any feature of scheduled backups?

You can schedule backups anyway you like :). If you are on Windows I
believe you can use the job agent stuff in contrib. That might make your
life easier. Otherwise you can write a batch file.


>      1. In case there is no backup and I want to shift my data files
>         to a new PC, how to do that?

You have to move the whole cluster. (Your data directory)


>      1. Are the Redo Logs enabled by default?

Yes, its called WAL.

Sincerely,

Joshua D. Drake


--
PostgreSQL.org Major Contributor
Command Prompt, Inc: http://www.commandprompt.com/ - 509.416.6579
Consulting, Training, Support, Custom Development, Engineering

Re: Backup issues

From
"Joshua D. Drake"
Date:
On Fri, 2010-06-25 at 23:24 +0530, RP Khare wrote:
> I never used PostgreSQL in production environment. Now I got an
> opportunity to migrate a MySQL production database to PostgreSQL.
> Before migrating, I have few queries on data recovery:
>
>      1. Is there any feature of scheduled backups?

You can schedule backups anyway you like :). If you are on Windows I
believe you can use the job agent stuff in contrib. That might make your
life easier. Otherwise you can write a batch file.


>      1. In case there is no backup and I want to shift my data files
>         to a new PC, how to do that?

You have to move the whole cluster. (Your data directory)


>      1. Are the Redo Logs enabled by default?

Yes, its called WAL.

Sincerely,

Joshua D. Drake


--
PostgreSQL.org Major Contributor
Command Prompt, Inc: http://www.commandprompt.com/ - 509.416.6579
Consulting, Training, Support, Custom Development, Engineering


Re: Backup issues

From
Craig Ringer
Date:
On 26/06/2010 2:07 AM, Joshua D. Drake wrote:
> On Fri, 2010-06-25 at 23:24 +0530, RP Khare wrote:
>> I never used PostgreSQL in production environment. Now I got an
>> opportunity to migrate a MySQL production database to PostgreSQL.
>> Before migrating, I have few queries on data recovery:
>>
>>       1. Is there any feature of scheduled backups?
>
> You can schedule backups anyway you like :). If you are on Windows I
> believe you can use the job agent stuff in contrib. That might make your
> life easier. Otherwise you can write a batch file.
>
>
>>       1. In case there is no backup and I want to shift my data files
>>          to a new PC, how to do that?
>
> You have to move the whole cluster. (Your data directory)

... and you can only do it to a new machine of the same CPU architecture
and major version of PostgreSQL. You can't move from, say, a 32-bit to a
64-bit machine without a dump and reload, nor from PostgreSQL 8.3 to
PostgreSQL 8.4.

Keep good pg_dump backups, or maintain a PITR warm spare, because that's
the best way to shift your data. You *can* move the cluster, but it's a
pain.

--
Craig Ringer