Thread: how to restore postgre 8.3 from data directory
Hi!
I need to restore the postgre 8.3 from a data directory /var/lib/postgresql/8.3/main which has the following content:
$ ls -l
drwx------ 5 postgres postgres 4096 oct 14 11:53 base
drwx------ 2 postgres postgres 4096 oct 14 12:10 global
drwx------ 2 postgres postgres 4096 oct 14 11:53 pg_clog
drwx------ 4 postgres postgres 4096 oct 14 11:53 pg_multixact
drwx------ 2 postgres postgres 4096 oct 14 11:53 pg_subtrans
drwx------ 2 postgres postgres 4096 oct 14 11:53 pg_tblspc
drwx------ 2 postgres postgres 4096 oct 14 11:53 pg_twophase
-rw------- 1 postgres postgres 4 oct 14 11:53 PG_VERSION
drwx------ 3 postgres postgres 4096 oct 14 11:53 pg_xlog
-rw------- 1 postgres postgres 133 oct 14 12:05 postmaster.opts
lrwxrwxrwx 1 root root 31 oct 14 11:53 root.crt -> /etc/postgresql-common/root.
I need to restore the postgre 8.3 from a data directory /var/lib/postgresql/8.3/main which has the following content:
$ ls -l
drwx------ 5 postgres postgres 4096 oct 14 11:53 base
drwx------ 2 postgres postgres 4096 oct 14 12:10 global
drwx------ 2 postgres postgres 4096 oct 14 11:53 pg_clog
drwx------ 4 postgres postgres 4096 oct 14 11:53 pg_multixact
drwx------ 2 postgres postgres 4096 oct 14 11:53 pg_subtrans
drwx------ 2 postgres postgres 4096 oct 14 11:53 pg_tblspc
drwx------ 2 postgres postgres 4096 oct 14 11:53 pg_twophase
-rw------- 1 postgres postgres 4 oct 14 11:53 PG_VERSION
drwx------ 3 postgres postgres 4096 oct 14 11:53 pg_xlog
-rw------- 1 postgres postgres 133 oct 14 12:05 postmaster.opts
lrwxrwxrwx 1 root root 31 oct 14 11:53 root.crt -> /etc/postgresql-common/root.
crt
lrwxrwxrwx 1 root root 36 oct 14 11:53 server.crt -> /etc/ssl/certs/ssl-cert-snakeoil.pem
lrwxrwxrwx 1 root root 38 oct 14 11:53 server.key -> /etc/ssl/private/ssl-cert-snakeoil.key
I'm tried to replace this directory with the directory of my backup, but I had no success on startup.
Is it possible restore postgre from a data source (I don't have any dump)
Thanks, ALberto
lrwxrwxrwx 1 root root 36 oct 14 11:53 server.crt -> /etc/ssl/certs/ssl-cert-snakeoil.pem
lrwxrwxrwx 1 root root 38 oct 14 11:53 server.key -> /etc/ssl/private/ssl-cert-snakeoil.key
I'm tried to replace this directory with the directory of my backup, but I had no success on startup.
Is it possible restore postgre from a data source (I don't have any dump)
Thanks, ALberto
It depends, the original data was from what version ?, what platform (x86/x86_64/ppc/..) ? 2009/10/14 Alberto Asuero Arroyo <albertoasuero@gmail.com>: > Hi! > > I need to restore the postgre 8.3 from a data directory > /var/lib/postgresql/8.3/main which has the following content: > > $ ls -l > > drwx------ 5 postgres postgres 4096 oct 14 11:53 base > drwx------ 2 postgres postgres 4096 oct 14 12:10 global > drwx------ 2 postgres postgres 4096 oct 14 11:53 pg_clog > drwx------ 4 postgres postgres 4096 oct 14 11:53 pg_multixact > drwx------ 2 postgres postgres 4096 oct 14 11:53 pg_subtrans > drwx------ 2 postgres postgres 4096 oct 14 11:53 pg_tblspc > drwx------ 2 postgres postgres 4096 oct 14 11:53 pg_twophase > -rw------- 1 postgres postgres 4 oct 14 11:53 PG_VERSION > drwx------ 3 postgres postgres 4096 oct 14 11:53 pg_xlog > -rw------- 1 postgres postgres 133 oct 14 12:05 postmaster.opts > lrwxrwxrwx 1 root root 31 oct 14 11:53 root.crt -> > /etc/postgresql-common/root. > crt > lrwxrwxrwx 1 root root 36 oct 14 11:53 server.crt -> > /etc/ssl/certs/ssl-cert-snakeoil.pem > lrwxrwxrwx 1 root root 38 oct 14 11:53 server.key -> > /etc/ssl/private/ssl-cert-snakeoil.key > > > > I'm tried to replace this directory with the directory of my backup, but I > had no success on startup. > > Is it possible restore postgre from a data source (I don't have any dump) > > Thanks, ALberto
I have the same version in the two servers (postgre 8.3), the difference is only the architecture , the postgres was running in x86_64 and the restore machine is a x86. But I can try to restore in x86, should I do it?
thanks alberto
thanks alberto
On Wed, Oct 14, 2009 at 12:02 PM, jose javier parra sanchez <jojapasa@gmail.com> wrote:
It depends, the original data was from what version ?, what platform
(x86/x86_64/ppc/..) ?
2009/10/14 Alberto Asuero Arroyo <albertoasuero@gmail.com>:--> Hi!
>
> I need to restore the postgre 8.3 from a data directory
> /var/lib/postgresql/8.3/main which has the following content:
>
> $ ls -l
>
> drwx------ 5 postgres postgres 4096 oct 14 11:53 base
> drwx------ 2 postgres postgres 4096 oct 14 12:10 global
> drwx------ 2 postgres postgres 4096 oct 14 11:53 pg_clog
> drwx------ 4 postgres postgres 4096 oct 14 11:53 pg_multixact
> drwx------ 2 postgres postgres 4096 oct 14 11:53 pg_subtrans
> drwx------ 2 postgres postgres 4096 oct 14 11:53 pg_tblspc
> drwx------ 2 postgres postgres 4096 oct 14 11:53 pg_twophase
> -rw------- 1 postgres postgres 4 oct 14 11:53 PG_VERSION
> drwx------ 3 postgres postgres 4096 oct 14 11:53 pg_xlog
> -rw------- 1 postgres postgres 133 oct 14 12:05 postmaster.opts
> lrwxrwxrwx 1 root root 31 oct 14 11:53 root.crt ->
> /etc/postgresql-common/root.
> crt
> lrwxrwxrwx 1 root root 36 oct 14 11:53 server.crt ->
> /etc/ssl/certs/ssl-cert-snakeoil.pem
> lrwxrwxrwx 1 root root 38 oct 14 11:53 server.key ->
> /etc/ssl/private/ssl-cert-snakeoil.key
>
>
>
> I'm tried to replace this directory with the directory of my backup, but I
> had no success on startup.
>
> Is it possible restore postgre from a data source (I don't have any dump)
>
> Thanks, ALberto
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
2009/10/14 Alberto Asuero Arroyo <albertoasuero@gmail.com>: > I have the same version in the two servers (postgre 8.3), the difference is > only the architecture , the postgres was running in x86_64 and the restore > machine is a x86. But I can try to restore in x86, should I do it? No, you can't. Data is architecture dependant. > > thanks alberto > > > > > On Wed, Oct 14, 2009 at 12:02 PM, jose javier parra sanchez > <jojapasa@gmail.com> wrote: >> >> It depends, the original data was from what version ?, what platform >> (x86/x86_64/ppc/..) ? >> >> 2009/10/14 Alberto Asuero Arroyo <albertoasuero@gmail.com>: >> > Hi! >> > >> > I need to restore the postgre 8.3 from a data directory >> > /var/lib/postgresql/8.3/main which has the following content: >> > >> > $ ls -l >> > >> > drwx------ 5 postgres postgres 4096 oct 14 11:53 base >> > drwx------ 2 postgres postgres 4096 oct 14 12:10 global >> > drwx------ 2 postgres postgres 4096 oct 14 11:53 pg_clog >> > drwx------ 4 postgres postgres 4096 oct 14 11:53 pg_multixact >> > drwx------ 2 postgres postgres 4096 oct 14 11:53 pg_subtrans >> > drwx------ 2 postgres postgres 4096 oct 14 11:53 pg_tblspc >> > drwx------ 2 postgres postgres 4096 oct 14 11:53 pg_twophase >> > -rw------- 1 postgres postgres 4 oct 14 11:53 PG_VERSION >> > drwx------ 3 postgres postgres 4096 oct 14 11:53 pg_xlog >> > -rw------- 1 postgres postgres 133 oct 14 12:05 postmaster.opts >> > lrwxrwxrwx 1 root root 31 oct 14 11:53 root.crt -> >> > /etc/postgresql-common/root. >> > crt >> > lrwxrwxrwx 1 root root 36 oct 14 11:53 server.crt -> >> > /etc/ssl/certs/ssl-cert-snakeoil.pem >> > lrwxrwxrwx 1 root root 38 oct 14 11:53 server.key -> >> > /etc/ssl/private/ssl-cert-snakeoil.key >> > >> > >> > >> > I'm tried to replace this directory with the directory of my backup, but >> > I >> > had no success on startup. >> > >> > Is it possible restore postgre from a data source (I don't have any >> > dump) >> > >> > Thanks, ALberto >> >> -- >> Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) >> To make changes to your subscription: >> http://www.postgresql.org/mailpref/pgsql-admin > >
OK,
I've restore the data into a machine with x86_64 with success. I've only moved my backup data directory into the restoration machine's postgres data directory (cspecifically /var/lib/postgresql/8.3/main).
I've only had a little problem with the locales.
Thanks jose,
I've restore the data into a machine with x86_64 with success. I've only moved my backup data directory into the restoration machine's postgres data directory (cspecifically /var/lib/postgresql/8.3/main).
I've only had a little problem with the locales.
Thanks jose,
On Wed, Oct 14, 2009 at 12:11 PM, jose javier parra sanchez <jojapasa@gmail.com> wrote:
2009/10/14 Alberto Asuero Arroyo <albertoasuero@gmail.com>:> I have the same version in the two servers (postgre 8.3), the difference isNo, you can't. Data is architecture dependant.
> only the architecture , the postgres was running in x86_64 and the restore
> machine is a x86. But I can try to restore in x86, should I do it?--
>
> thanks alberto
>
>
>
>
> On Wed, Oct 14, 2009 at 12:02 PM, jose javier parra sanchez
> <jojapasa@gmail.com> wrote:
>>
>> It depends, the original data was from what version ?, what platform
>> (x86/x86_64/ppc/..) ?
>>
>> 2009/10/14 Alberto Asuero Arroyo <albertoasuero@gmail.com>:
>> > Hi!
>> >
>> > I need to restore the postgre 8.3 from a data directory
>> > /var/lib/postgresql/8.3/main which has the following content:
>> >
>> > $ ls -l
>> >
>> > drwx------ 5 postgres postgres 4096 oct 14 11:53 base
>> > drwx------ 2 postgres postgres 4096 oct 14 12:10 global
>> > drwx------ 2 postgres postgres 4096 oct 14 11:53 pg_clog
>> > drwx------ 4 postgres postgres 4096 oct 14 11:53 pg_multixact
>> > drwx------ 2 postgres postgres 4096 oct 14 11:53 pg_subtrans
>> > drwx------ 2 postgres postgres 4096 oct 14 11:53 pg_tblspc
>> > drwx------ 2 postgres postgres 4096 oct 14 11:53 pg_twophase
>> > -rw------- 1 postgres postgres 4 oct 14 11:53 PG_VERSION
>> > drwx------ 3 postgres postgres 4096 oct 14 11:53 pg_xlog
>> > -rw------- 1 postgres postgres 133 oct 14 12:05 postmaster.opts
>> > lrwxrwxrwx 1 root root 31 oct 14 11:53 root.crt ->
>> > /etc/postgresql-common/root.
>> > crt
>> > lrwxrwxrwx 1 root root 36 oct 14 11:53 server.crt ->
>> > /etc/ssl/certs/ssl-cert-snakeoil.pem
>> > lrwxrwxrwx 1 root root 38 oct 14 11:53 server.key ->
>> > /etc/ssl/private/ssl-cert-snakeoil.key
>> >
>> >
>> >
>> > I'm tried to replace this directory with the directory of my backup, but
>> > I
>> > had no success on startup.
>> >
>> > Is it possible restore postgre from a data source (I don't have any
>> > dump)
>> >
>> > Thanks, ALberto
>>
>> --
>> Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgsql-admin
>
>Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin