Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
07-31-2003, 02:02 PM
|
#1
|
LQ Newbie
Registered: Jul 2003
Location: Hamilton
Distribution: Redhat 9.0
Posts: 7
Rep:
|
Postgresql and Crontab
hello,
Now that I have figured out how to send an attachment with crontab, I am attempting to add the backup procedure to the cronjob.
su postgres
pg_dumpall > test
and the error I keep getting is:
postgres does not know where to find the database system data. You must specify the directory that contains the database system either by specifying the -D invocation option or by setting the PGDATA environment variable.
HELP!!
Thanks
|
|
|
08-15-2003, 09:05 AM
|
#2
|
Member
Registered: Jul 2003
Location: Louisville aka Derby City
Distribution: WinXP SP2 and SP3, W2K Server, Ubuntu
Posts: 313
Rep:
|
hello squadja:
Do a:
find / -name data
This may print several results. Look specifically for either:
/var/lib/pgsql/data
-or-
/usr/local/pgsql/data
Hopefully you will only see one or the other. If you see both, there is a different issue to contend with. Whichever you see, that is the path to your postgresql data directory. Mine happens to be the /var/lib/pgsql/data so when I invoke the command you refer to above I would say:
pg_dumpall -D /var/lib/pgsql/data > test
Postgresql must know this path to do nearly any pg command so it would be helpful to set up the variable it looks for by default, which is PGDATA. To do this go to your:
/etc/profile
file and add this to the file:
PGDATA = /var/lib/pgsql/data
export PGDATA
assuming your search for the data directory produces the same path as mine. Good luck.
|
|
|
08-15-2003, 01:11 PM
|
#3
|
Senior Member
Registered: Sep 2002
Location: Nashville, TN
Posts: 1,552
Rep:
|
Re: Postgresql and Crontab
Quote:
Originally posted by squadja
and the error I keep getting is:
postgres does not know where to find the database system data. You must specify the directory that contains the database system either by specifying the -D invocation option or by setting the PGDATA environment variable.
|
That error message was not a big enough clue?
|
|
|
08-15-2003, 01:29 PM
|
#4
|
Member
Registered: Jul 2003
Location: Louisville aka Derby City
Distribution: WinXP SP2 and SP3, W2K Server, Ubuntu
Posts: 313
Rep:
|
...kind of a harsh retort. One of the reasons people hate Linux (yes, its true, lots of people hate Linux!) is because they get bashed in the head for asking questions. If the learning curve doesnt get them, they get sick of getting piled on every time they open their pie hole. I ahve put in my time reading thousands on pages of docs, books, mans, etc. but I still hate getting blasted for asking a "stupid" question. Give newbies slack. Isn't the whole point of this entire website to ask questions?
|
|
|
All times are GMT -5. The time now is 05:43 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|