PgAgent Job Scheduling-Backup - Mailing list pgsql-admin

From Jayakumar_Mukundaraju
Subject PgAgent Job Scheduling-Backup
Date
Msg-id 8BE2E1772BEE8D40B0FB9E59DF2A645E04C4E8A3@hcsmsg002.corp.satyam.ad
Whole thread Raw
In response to Re: PgAgent Job Scheduling-Backup  ("Vishal Arora" <aroravishal22@hotmail.com>)
List pgsql-admin
1)      Run PgAgent.sql script in maintenance database (Postgres database by >default).
        I copied that script and executied in Query tool, it is executed and i get that job icon tab.
2)      Install PgAgent service using the following command on command >prompt -
       "C:\Program Files\PostgreSQL\8.2\bin\pgAgent" INSTALL pgAgent -u postgres -p XXXX hostaddr=127.0.0.1 dbname=postgres user=Postgres
         I installed the pgAgent and it is running..( I checkied in Administrative tool>>Services>>> there PostgreSQL Scheduling Agent >> status is started

   Replace the path of pgAgent if you are not using default installation path of Postgres
   My pgAgent path is C:\Program FIles\PostgreSQL\8.2\bin\pgAgent

    Replace XXXX with the password of OS User Postgres (One given while installing Postgres on windows) ????

      dbname=postgres (change if your maintenance database is different.)
      my Maintenance database is postgres.
3)      Login using Postgres user account in windows. ?????
4)      Try to access pgAdmin III tool in that login. (These two steps are required to create pgpass.conf file under Postgres login account.)
         In pgpass file i have two logins and password, one is server login and another is Account name and password
5)      Login back to your normal account.???
6)      Start pgAgent service using the following command on command prompt    Net start pgAgent
        The command promopt is psql to postgresl prompt... postgres-# i entered       Net start pgAgent.... The cursor comes next line that is  postgres-# prompt
         I entered in  postgres-# pg_dump -f "D:\trial.sql" -apostgres -Upostgres... The cursor comes next line that is postgres-# prompt
7)      Create a new job using PgAdmin III
        Yes i created new jobs name is BACKUP

8)      Under step tab click Add to add new step. :- Yes i created new steps
>*       Specify some name : step name is B1
>*       Kind - SQL / Batch depending upon the kind of job to be performed.
>*       Database on which the job is to be performed.
>*       Definition tab would contain a SQL command if kind selected is SQL :- In the step tab Definition place i entered  @echo off "C:\Program FIles\PostgreSQL\8.2\bin\pg_dump" -Upostgres -f D:\test\test.sql -F p -C -d -Dpostgres      @echo on                                       and saved that tab. 
>*       Definition tab would contain path of Batch file if kind selected is
>Batch
>9)      Under Schedule tab in Job window click Add to add new schedule for the job  : - I did it i added BK1 as a schedule name
>*       Specify some name
>*       Specify the start date & time :- todays date and time is 30mnts
>*       Specify the end date and time:- tomorrows date and time is 45 mnts
>*       Specify days or weekdays, months when the task needs to be performed in days tab
>*       Specify time hours & Minutes when you want the task to be performed. (Atleast One hour & minute to be selected.)
>*       Specify exception if any when you do not want the task to be performed.
>10)     All set to work.
 
This was only i did it.. Kindly guide me  where i went wrong....
 
Thanks & Regards
Jayakumar M
 
 

DISCLAIMER:
This email (including any attachments) is intended for the sole use of the intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or distribution or forwarding of any or all of the contents in this message is STRICTLY PROHIBITED. If you are not the intended recipient, please contact the sender by email and delete all copies; your cooperation in this regard is appreciated..

pgsql-admin by date:

Previous
From: Peter Elmers
Date:
Subject: Re: Several postgres installation on windows possible?
Next
From: De Leeuw Guy
Date:
Subject: Re: cache problem (v2)