Home > Archive > PostgreSQL Bugs > November 2005 > On-line backup









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author On-line backup
netmaniac\@libero\.it

2005-11-28, 9:24 am

Is it possible to do an online backup from linux to windows ?

Postgres : 8.1.0
linux : Centos 4.2 , 32 bit
windows : 2000 Server , 32 bit

When I try to start recovery process on windows I'm getting the following error:

FATAL: incorrect checksum in control file

thank you


---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Jim C. Nasby

2005-11-28, 8:28 pm

What exact commands are you using for both the backup and the restore?

On Mon, Nov 28, 2005 at 02:38:27PM +0100, netmaniac@libero.it wrote:
> Is it possible to do an online backup from linux to windows ?
>
> Postgres : 8.1.0
> linux : Centos 4.2 , 32 bit
> windows : 2000 Server , 32 bit
>
> When I try to start recovery process on windows I'm getting the following error:
>
> FATAL: incorrect checksum in control file
>
> thank you
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings
>


--
Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Diego Cattelan

2005-11-28, 8:28 pm


> What exact commands are you using for both the backup and the restore?
>

- at boot time the linux box mount a smb share '/mnt/walarchive810'
- I have modified postgresql.conf parameter
archive_command='cp -i /mnt/walarchive810/%f </dev/null'
- restarting postgres shows that wal files are correctly archived
- install postgres 8.1 on win 2000 server and test if work: ok
- stop postgres set postgres service start mode to manual
- connect to postgres on linux
- issue command select ps_start_backup('con
tab')
- used tar to archive the data folder as database.tar.gz
- select pg_stop_backup()
- copy database.tar.gz on windows

- now I have run a script wich updates a database in the linux box and
the wal files where correctly copied
- stop linux postgres
- on the windows machine:
- rename folder data as windataoriginal
- decompress database.tar.gz as data folder
- modify data directory permission and ownership
- create a recovery.conf into data directory with
restore_command='cop
y d:/shared/pgwal810/%f "%p"'
- now starting postgres with the command pg_ctl start -D
d:\local\postgresql8
10\data give me 2 different errors:
- unsupported locale (disappeared after changing locale from
'it_IT.UTF-8' to 'C')
- FATAL: incorrect checksum in control file

I have done all manually so I don't remember exactly all commands issued
for obtain this result.
Thank you very much
> On Mon, Nov 28, 2005 at 02:38:27PM +0100, netmaniac@libero.it wrote:
>
>
>



---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Jim C. Nasby

2005-11-29, 1:24 pm

Ahh, ok. There's a couple issues here. Both the data files and WAL logs
are in a binary format that is not necessarily compatable across
different OSes. I don't know if linux to windows should work by design
or not, but it wouldn't surprise me if it won't work.

Another issue is hardware. One example would be going from an Opteron to
a Xeon; that probably won't work. Even going from a 32 bit to a 64 bit
CPU in the same family might not work.

Basically, if you want to be able to use WAL-based backups on different
machines, those machines should be as identical as possible; at a
minimum running the same OS and using the same CPUs. This isn't to say
it's impossible to make this work across different CPUs or maybe even
different OSes, but you're asking for trouble.

One more thing; although the compatability checks were recently improved
there might still be odd combinations that will pass the control file
check but still end up corrupting data.

On Tue, Nov 29, 2005 at 01:21:12AM +0100, Diego Cattelan wrote:
>
> - at boot time the linux box mount a smb share '/mnt/walarchive810'
> - I have modified postgresql.conf parameter
> archive_command='cp -i /mnt/walarchive810/%f </dev/null'
> - restarting postgres shows that wal files are correctly archived
> - install postgres 8.1 on win 2000 server and test if work: ok
> - stop postgres set postgres service start mode to manual
> - connect to postgres on linux
> - issue command select ps_start_backup('con
tab')
> - used tar to archive the data folder as database.tar.gz
> - select pg_stop_backup()
> - copy database.tar.gz on windows
>
> - now I have run a script wich updates a database in the linux box and
> the wal files where correctly copied
> - stop linux postgres
> - on the windows machine:
> - rename folder data as windataoriginal
> - decompress database.tar.gz as data folder
> - modify data directory permission and ownership
> - create a recovery.conf into data directory with
> restore_command='cop
y d:/shared/pgwal810/%f "%p"'
> - now starting postgres with the command pg_ctl start -D
> d:\local\postgresql8
10\data give me 2 different errors:
> - unsupported locale (disappeared after changing locale from
> 'it_IT.UTF-8' to 'C')
> - FATAL: incorrect checksum in control file
>
> I have done all manually so I don't remember exactly all commands issued
> for obtain this result.
> Thank you very much
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings
>


--
Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Bruno Wolff III

2005-11-29, 8:25 pm

On Tue, Nov 29, 2005 at 01:21:12 +0100,
Diego Cattelan <netmaniac@libero.it> wrote:
>
> - at boot time the linux box mount a smb share '/mnt/walarchive810'
> - I have modified postgresql.conf parameter
> archive_command='cp -i /mnt/walarchive810/%f </dev/null'
> - restarting postgres shows that wal files are correctly archived
> - install postgres 8.1 on win 2000 server and test if work: ok
> - stop postgres set postgres service start mode to manual
> - connect to postgres on linux
> - issue command select ps_start_backup('con
tab')
> - used tar to archive the data folder as database.tar.gz
> - select pg_stop_backup()
> - copy database.tar.gz on windows


I don't think you can count on linux and windows versions on postgres being
binary compatible.

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com