dbTalk Databases Forums  

[BUGS] On-line backup

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] On-line backup in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
netmaniac\@libero\.it
 
Posts: n/a

Default [BUGS] On-line backup - 11-28-2005 , 07:38 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 e=
rror:

FATAL: incorrect checksum in control file

thank you


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

Reply With Quote
  #2  
Old   
Jim C. Nasby
 
Posts: n/a

Default Re: [BUGS] On-line backup - 11-28-2005 , 03:29 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 (AT) libero (DOT) it wrote:
Quote:
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 (AT) pervasive (DOT) 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


Reply With Quote
  #3  
Old   
Diego Cattelan
 
Posts: n/a

Default Re: [BUGS] On-line backup - 11-28-2005 , 06:23 PM




Quote:
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('contab')
- 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='copy d:/shared/pgwal810/%f "%p"'
- now starting postgres with the command pg_ctl start -D
d:\local\postgresql810\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
Quote:
On Mon, Nov 28, 2005 at 02:38:27PM +0100, netmaniac (AT) libero (DOT) 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





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


Reply With Quote
  #4  
Old   
Jim C. Nasby
 
Posts: n/a

Default Re: [BUGS] On-line backup - 11-29-2005 , 12:38 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:
Quote:
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('contab')
- 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='copy d:/shared/pgwal810/%f "%p"'
- now starting postgres with the command pg_ctl start -D
d:\local\postgresql810\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 (AT) libero (DOT) 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






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

--
Jim C. Nasby, Sr. Engineering Consultant jnasby (AT) pervasive (DOT) 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


Reply With Quote
  #5  
Old   
Bruno Wolff III
 
Posts: n/a

Default Re: [BUGS] On-line backup - 11-29-2005 , 03:46 PM



On Tue, Nov 29, 2005 at 01:21:12 +0100,
Diego Cattelan <netmaniac (AT) libero (DOT) it> wrote:
Quote:
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('contab')
- 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


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.