From: | "Jayakumar_Mukundaraju" <Jayakumar_Mukundaraju(at)satyam(dot)com> |
---|---|
To: | "Vishal Arora" <aroravishal22(at)hotmail(dot)com>, <ashish(dot)karalkar(at)info-spectrum(dot)com>, <pgsql-admin(at)postgresql(dot)org> |
Subject: | Reg : Backup job Scheduler... |
Date: | 2007-08-03 11:22:40 |
Message-ID: | 8BE2E1772BEE8D40B0FB9E59DF2A645E04C4E8EC@hcsmsg002.corp.satyam.ad |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Dear All,
I did the Backup job schedule in windows through Schedule Task, it is working fine..
The following are the steps..
1. I created one batch file in my D:\Backup\postgres_backup.bat
The contents are..
@echo off
rem "c:\Program Files\pgAdmin III\1.7\pg_dump.exe" -i -h localhost -p 5432 -U rajbackup -F t -b -f "postgres_db.tar" raj
rem "C:\Program Files\PostgreSQL\8.2\bin\pg_dump" -U (user name) -F c -f "postgres_db.bak" -F p -C -D (database name)
"C:\Program Files\PostgreSQL\8.2\bin\pg_dump.exe" -i -h localhost -p 5432 -U postgress -F c -v -f "D:\BACKUP\postgres_db.backup" Database name
rem "C:\Program Files\PostgreSQL\8.2\bin\pg_dump.exe" -i -h localhost -p 5432 -U postgress -F p -v -f "D:\BACKUP\raj\postgres_db.sql" Database name
@echno on
2. After i created one more batchfile backup_post.bat
The contents are
@echo off
REM author :jaikumar(at)(dot)gmail(dot)com,
REM Dont hasitate to a suggestions
call postgres_backup.bat
Set CURRDATE=CURRDATE.TMP
Set CURRTIME=CURRTIME.TMP
DATE /T > %CURRDATE%
TIME /T > %CURRTIME%
Set PARSEARG="eol=; tokens=1,2,3,4* delims=/, "
For /F %PARSEARG% %%i in (%CURRDATE%) Do SET YYYYMMDD=%%l%%k%%j
Set PARSEARG="eol=; tokens=1,2,3* delims=:, "
For /F %PARSEARG% %%i in (%CURRTIME%) Do Set HHMM=%%i%%j%%k
ren "D:\BACKUP\postgres_db.backup" "postgres_db_%YYYYMMDD%_%HHMM%.backup"
del currdate.tmp
del currtime.tmp
3. I scheduled the jobs in schedule task, that is in control pannel,
a. Task : - Create new job name...
start in : D:\BACKUP\
RUN as : your login name
put a tick mark in Enabled [scheduled task runs at specified time]
b. Schedule..
schedule task: Daily start time : 12.00 am .... and go to Advance
tick Repeat task ... Every column give (Hours u want) (mintues and hours)
Duration 24...... give OK
C. Settings : tick Wake the computer to run this task..
d. Security : check the login permissions.. and clik ok ... check the backup job stored place..
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.
From | Date | Subject | |
---|---|---|---|
Next Message | Казорез Александр Олегович | 2007-08-03 12:57:29 | Help |
Previous Message | Dr. Lal Bopearachchi | 2007-08-03 06:54:10 | Postgresql Login problem |