\\脚本说明,PMSDB_T数据库 备份目录 e:\backup\目录下, b保留7天,
@echo off
rem set backupfile=f_database_%date:~0,4%-%date:~5,2%-%date:~8,2%.dmp
rem set logfile=f_database_%date:~0,4%-%date:~5,2%-%date:~8,2%.log
rem delete 7 days files
forfiles /p "e:\backup" /d -8 /c "cmd /c echo deleting @file ... && del /f @path"
D:\"Program Files"\PostgreSQL\9.1\bin\pg_dump.exe --host localhost --port 5432 --username "postgres" --no-password --format tar --blobs --encoding UTF8 --verbose --file "E:\backup\PMSDB_T_%date:~0,4%-%date:~5,2%-%date:~8,2%.backup" "PMSDB_T"
阅读(1352) | 评论(0) | 转发(0) |