@echo off
title:数据库备份
::说明
:: 备份数据库
set YYYYmmdd=%date:~0,4%%date:~5,2%%date:~8,2%
set hhmiss=%time:~0,2%%time:~3,2%%time:~6,2%
set filename=%YYYYmmdd%_%hhmiss%.backup
echo 开始备份数据库...
set rwdddir=d:/任务调度
set rwddfilename=%rwdddir%/%filename%
IF NOT EXIST "%rwdddir%" MD "%rwdddir%"
set PGPASSWORD=123456
pg_dump -h localhost -p 5432 -U postgresql -F c -b -v -f "%rwddfilename%" -d rwdd
echo 备份任务调度数据库完成
网友评论