Thread: problem in database backup

problem in database backup

From
"vijaykumar M"
Date:
<div style="background-color:"><div><p><br />Hi All,<p>I'm using Postgresql V7.3.3, on that i created one database with
name"mydb".<p><font color="#000033"><strong> PostgreSQL 7.3.3 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.2
20020903(Red Hat Linux 8.0 3.2-7)</strong></font><p>While taking a backup of my postgresql database, i'm getting the
belowerror.<p>bash-2.05b$ <strong><font color="#993366">pg_dump mydb >mydb.out<br />pg_dump: server version:
SAGES/pg_dump.mo;pg_dump version: 7.2.2<br />pg_dump: aborting because of version mismatch  (Use the -i option to
proceedany<br />================================================================</font></strong><p><strong><font
color="#993366">bash-2.05b$pg_dump -i mydb > mydb.out<br />pg_dump: server version: SAGES/pg_dump.mo; pg_dump
version:7.2.2<br />pg_dump: proceeding despite version mismatch<br />pg_dump: query to obtain list of data types
failed:ERROR:  Attribute "typprtlen" not found<br
/>==============================================================</font></strong><p><fontcolor="#000033">After getting
these</font><fontcolor="#000033"> errors, i tried to check the version of pg_dump on my system by using the below
command.Here is the result .....</font><p><strong><font color="#993366">[root@sql-linux root]# find / -name pg_dump
-print<br/>/root/postgresql-7.3.3/src/bin/pg_dump<br />/root/postgresql-7.3.3/src/bin/pg_dump/pg_dump<br
/>/usr/bin/pg_dump<br/>/usr/local/pgsql/bin/pg_dump<br /></font></strong><font color="#993366"></font><p><font
color="#993366">============================================================</font><p><fontcolor="#000033">Kindly guide
meto solve this problem. .. </font><p><font color="#000033">Thanks in advance,</font><p><font color="#000033">With
Regards,</font><p><fontcolor="#000033">Vijay</font><p> <p> <p> <p> <p> </div></div><br clear="all" /><hr />It's all
happening@ F1. Feel the thrill! <a href="http://g.msn.com/8HMXENIN/2734??PS=">Race along right here!</a> 

Re: problem in database backup

From
Tomasz Myrta
Date:
Dnia 2003-07-31 13:13, Użytkownik vijaykumar M napisał:

> 
> Hi All,
> 
> I'm using Postgresql V7.3.3, on that i created one database with name 
> "mydb".
> 
> * PostgreSQL 7.3.3 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.2 
> 20020903 (Red Hat Linux 8.0 3.2-7)*
> 
> While taking a backup of my postgresql database, i'm getting the below 
> error.
> 
> bash-2.05b$ *pg_dump mydb >mydb.out
> pg_dump: server version: SAGES/pg_dump.mo; pg_dump version: 7.2.2
> pg_dump: aborting because of version mismatch  (Use the -i option to 
> proceed any
> ================================================================*
> 
> *bash-2.05b$ pg_dump -i mydb > mydb.out
> pg_dump: server version: SAGES/pg_dump.mo; pg_dump version: 7.2.2
> pg_dump: proceeding despite version mismatch
> pg_dump: query to obtain list of data types failed: ERROR:  Attribute 
> "typprtlen" not found
> ==============================================================*
> 
> After getting these errors, i tried to check the version of pg_dump on 
> my system by using the below command. Here is the result .....
> 
> *[root@sql-linux root]# find / -name pg_dump -print
> /root/postgresql-7.3.3/src/bin/pg_dump
> /root/postgresql-7.3.3/src/bin/pg_dump/pg_dump
> /usr/bin/pg_dump
> /usr/local/pgsql/bin/pg_dump
> *

Probably you have both 7.2.2 and 7.3.3 pg_dump versions and PATH points 
to 7.2.2 /usr/bin/pg_dump. Try using /usr/local/pgsql/bin/pg_dump

Regards,
Tomasz Myrta




Re: problem in database backup

From
"vijaykumar M"
Date:
<div style="background-color:"><div><p>Hi Tomasz Myrta,<p>Thanks for ur info, u r correct .. after pointing to
/usr/bin/pgsql/bin/pg_dump,i'm able to take backup.. <p>Thank u very much..<p>With Regards<p>Vijay<p><br /><br
/> </div><div></div>>From:Tomasz Myrta  <div></div>>To: vijaykumar M  <div></div>>CC: pgsql-sql@postgresql.org
<div></div>>Subject:Re: [SQL] problem in database backup <div></div>>Date: Thu, 31 Jul 2003 13:40:45 +0200
<div></div>><div></div>>Dnia 2003-07-31 13:13, U�ytkownik vijaykumar M napisa�: <div></div>>
<div></div>>><div></div>>>Hi All, <div></div>>> <div></div>>>I'm using Postgresql V7.3.3, on
thati created one database with <div></div>>>name "mydb". <div></div>>> <div></div>>>* PostgreSQL
7.3.3on i686-pc-linux-gnu, compiled by GCC gcc (GCC) <div></div>>>3.2 20020903 (Red Hat Linux 8.0 3.2-7)*
<div></div>>><div></div>>>While taking a backup of my postgresql database, i'm getting the
<div></div>>>belowerror. <div></div>>> <div></div>>>bash-2.05b$ *pg_dump mydb >mydb.out
<div></div>>>pg_dump:server version: SAGES/pg_dump.mo; pg_dump version: 7.2.2 <div></div>>>pg_dump:
abortingbecause of version mismatch (Use the -i option <div></div>>>to proceed any
<div></div>>>================================================================*<div></div>>>
<div></div>>>*bash-2.05b$pg_dump -i mydb > mydb.out <div></div>>>pg_dump: server version:
SAGES/pg_dump.mo;pg_dump version: 7.2.2 <div></div>>>pg_dump: proceeding despite version mismatch
<div></div>>>pg_dump:query to obtain list of data types failed: ERROR: <div></div>>>Attribute "typprtlen"
notfound <div></div>>>==============================================================* <div></div>>>
<div></div>>>Aftergetting these errors, i tried to check the version of pg_dump <div></div>>>on my system
byusing the below command. Here is the result ..... <div></div>>> <div></div>>>*[root@sql-linux root]# find
/-name pg_dump -print <div></div>>>/root/postgresql-7.3.3/src/bin/pg_dump
<div></div>>>/root/postgresql-7.3.3/src/bin/pg_dump/pg_dump<div></div>>>/usr/bin/pg_dump
<div></div>>>/usr/local/pgsql/bin/pg_dump<div></div>>>* <div></div>> <div></div>>Probably you have
both7.2.2 and 7.3.3 pg_dump versions and PATH <div></div>>points to 7.2.2 /usr/bin/pg_dump. Try using
<div></div>>/usr/local/pgsql/bin/pg_dump<div></div>> <div></div>>Regards, <div></div>>Tomasz Myrta
<div></div>><div></div>> <div></div></div><br clear="all" /><hr />It's all happening @ F1. Feel the thrill! <a
href="http://g.msn.com/8HMWENIN/2734??PS=">Racealong right here!</a> 

Re: problem in database backup

From
Richard Huxton
Date:
On Thursday 31 July 2003 12:13, vijaykumar M wrote:
*please* don't post HTML only emails to mailing lists

OK - you seem to have two pg_dump - one in /usr/bin/pg_dump and one in 
/usr/local/pgsql/bin/pg_dump.

If you type "which pg_dump" as the user who normally does the dump, which one 
does it show (probably /usr/bin).

Now do "pg_dump --version" and see what version it is.

My guess is you want the one in /usr/local/... and the one in /usr/bin is from 
old RPMs

--  Richard Huxton Archonet Ltd