Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2009
    Posts
    1

    Red face Unanswered: pg_dump in crontab

    Hi,

    I want to set the crontab job for postgresql backup.

    I tried using this :

    $> /opt/PostgreSQL/8.4/bin/pg_dump -S postgres LIVE_LIBRARY > /backup/LMS_DB/db.sql

    But it asking password before start.

    I want it to be run without asking password. Assume my postgresql password is XXXX .

    What I need to change in the above code for this issue ?

    Thanks

  2. #2
    Join Date
    Nov 2003
    Posts
    2,935
    Provided Answers: 12
    You can either set an environment variable to hold the password or create a password file.

    Details are here:
    http://www.postgresql.org/docs/current/static/libpq-envars.html
    http://www.postgresql.org/docs/current/static/libpq-pgpass.html

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •