PostgreSQL:Windows中的自动备份 [英] PostgreSQL: Automated Backup in Windows
本文介绍了PostgreSQL:Windows中的自动备份的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使用下面的链接在Postgresql中创建自动备份,但是我不知道在哪里可以找到所需的dll,我被困在这里。因此,无法继续下一条说明。谁知道怎么做吗?请需要帮助。
I'm trying to create an automated backup in Postgresql using below link, but I don't know where to find the needed dll, I'm stuck here. Can't proceed to next instruction because of this. Can anyone knows how to do it? Need help please.
https:// wiki .postgresql.org / wiki / Automated_Backup_on_Windows
comerr32.dll
gssapi32.dll
k5sprt32.dll
krb_32.dll
libeay32.dll
libiconv2.dll
libpq.dll
Microsoft.VC80.CRT.manifest
msvcm80.dll
msvcp80.dll
msvcr80.dll
pg_dump.dll
ssleay32.dll
zlib1.dll
这是批处理文件脚本:
@echo off
for /f "tokens=1-4 delims=/ " %%i in ("%date%") do (
set dow=%%i
set month=%%j
set day=%%k
set year=%%l
)
set datestr=%month%_%day%_%year%
echo datestr is %datestr%
set BACKUP_FILE=<backup_name_>_%datestr%.backup
echo backup file name is %BACKUP_FILE%
SET PGPASSWORD=<password>
echo on
bin\pg_dump -i -h <localhost> -p 5432 -U <postgres> -F c -b -v -f %BACKUP_FILE% <db_name>
是否缺少语法?
何时手动执行的错误显示:
When manually executed error shows:
bin\pg_dump: illegal option -- i
推荐答案
我执行类似的操作
pg_dump.exe -h %SERVER% -p 5432 -U postgres -Fc -d %basedatos% -v -f %filebackup%
此变量分别替换值。
这篇关于PostgreSQL:Windows中的自动备份的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文