LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-06-2004, 12:27 AM   #1
vickr1z
Member
 
Registered: Mar 2004
Location: manila, philippines
Distribution: RH 7.3
Posts: 63

Rep: Reputation: 15
executing pg_dump?


good day to all.

anyone knows how to dump a data from PostgresQL server to my local computer?

i read the pg_dump --help and executing this command:
pg_dump -h 127.10.0.102 -U postgres mydata

but then i dont know where the mydata database goes. coz i tried this command:

postgres@Trinity:~$ psql mydata

and gives me error:

Code:
psql: FATAL: Database "mydata" does not exist in the system catalog.
can anyone help me out here?

thanks in advance.
 
Old 10-06-2004, 01:25 AM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Well ... I'm not quite sure about what you're trying to
achieve ... pg_dump is a backup utility for postgres
databases. It appears that there's no database by
the name of mydata on your machine.



Cheers,
Tink
 
Old 10-06-2004, 02:22 AM   #3
vickr1z
Member
 
Registered: Mar 2004
Location: manila, philippines
Distribution: RH 7.3
Posts: 63

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by Tinkster
Well ... I'm not quite sure about what you're trying to
achieve ... pg_dump is a backup utility for postgres
databases. It appears that there's no database by
the name of mydata on your machine.



Cheers,
Tink
i want to backup mydata to my machine coming from remote PostgresQL server -127.0.10.102-
 
Old 10-06-2004, 06:54 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,702

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
http://www.postgresql.org/docs/7.3/static/backup.html

Do you want to backup the data to a file or copy the database to your local PC postgres server?
 
Old 10-06-2004, 08:45 AM   #5
vickr1z
Member
 
Registered: Mar 2004
Location: manila, philippines
Distribution: RH 7.3
Posts: 63

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by michaelk
http://www.postgresql.org/docs/7.3/static/backup.html

Do you want to backup the data to a file or copy the database to your local PC postgres server?
thanks for reply mickaelk.
i want to copy the database to my local PC postgres server..

i have see how to do it now, by issuing the command:
Code:
psql -U vvbuen -f polmap_akbayan.sql polmap_akbayan
but then i have this erorrs while the script was running and building for my polmap_akbayan database..

Code:
NOTICE: CREATE TABLE will create implicit sequence 'cc_encodersee_cocv_id_seq'  for SERIAL column 'cc_encodersee_2003_cocv_id_seq.cc_encodersee_id'
ERROR:   language 'plpgsql' does not exist
ERROR:   Namespace 'gac_old' does not exist
ERROR:   REVOKE: function get_rate(character varying) does not exist
ERROR:   GRANT: function get_rate(character varying) does not exist
do u also have idea about the error on REVOKE: function get_rate?

this are some line content of my sql script:
Code:
-- TOC entry 303 OID (4720023)
-- Name get_rate (character varying); Type: function; Schema: public; Owner: vvbuen

CREATE FUNCTION get_rate (character varying) RETURNS numeric;
   AS '
   DECLARE 
       table_name_ ALIAS FOR $1;
       rate_value_ NUMBERIC ;
   BEGIN
       SELECT encoding_rate into rate_value_ FROM encoding_rates WHERE table_name = table_name_ ;
       RETURN rate_value_;
   END
'
    LANGUAGE plpgsql STRICT;

-- TOC entry 304 OID (4720023)
-- Name: get_rate (character varying); Type: ACL; Schema: public; Owner: vvbuen

REVOKE ALL ON FUNCTION rate_value (character varying) FROM PUBLIC;
GRANT AL ON FUNCTION rate_value (character varying) TO PUBLIC;
is the error caused by the plpgsql itself? i dont know about anything on plpgsql. how can i setup this?

Hoping again someone could give me a helping hand... thanks in advance.
 
Old 10-06-2004, 09:04 AM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,702

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
I haven't used plpgsql yet.

http://www.phpfreaks.com/postgresqlm...e/plpgsql.html
 
Old 10-06-2004, 11:39 AM   #7
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Quote:
Originally posted by vickr1z
i want to backup mydata to my machine coming from remote PostgresQL server -127.0.10.102-
You can't run pg_dump against a remote database,
it doesn't have any options for remote connections.

Log into the other box, run pg_dump and then scp
the result back to your box.



Cheers,
Tink
 
  


Reply



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

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



Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP not Executing Sometimes Herbalist Programming 3 06-20-2005 07:41 PM
Executables not executing! aranfitz Fedora 15 12-10-2004 07:55 PM
Executing from cgi theonebeyond Programming 4 10-04-2004 11:30 PM
Error While Executing ChangeOfPace Linux - Networking 3 05-07-2004 08:49 AM
Executing fbset suriyamohan Linux - Software 3 04-28-2003 07:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration