Re: On-line backup

From: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
To: Diego Cattelan <netmaniac(at)libero(dot)it>
Cc: "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: On-line backup
Date: 2005-11-29 18:38:11
Message-ID: 20051129183811.GE78939@pervasive.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

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:
>
> >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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Martin Pelikan 2005-11-29 19:38:39 BUG #2077: Hiding databases which I am not owner
Previous Message Tom Lane 2005-11-29 18:36:56 Re: postgres 8.1 crashing