#!/bin/bash
echo "开始执行 PostgreSql 数据库mjs_hr的备份！"
echo "backup ing -------------------"
nowtime=$(date +%F+%T)
export PGPASSWORD="Abcd@1234"
echo "时间：" $nowtime
set timeout 500
/var/postgresql/soft/pg15.6/bin/pg_dump --file "/data/cosmic/postgres/data/mjs_hr-"$nowtime".sql" --host "10.10.105.10" --port "5432" --username "cosmic" --dbname "mjstest_hr" --verbose --role "postgres" --format=c --blobs --encoding "UTF8"
echo "数据库 mjs_hr 备份结束！"
exit;
