postgresql【一】postgresql定时任务备份数据库

版权声明: https://blog.csdn.net/jiangxuexuanshuang/article/details/88699924
curDate=`date +"%Y-%m-%d-%H-%M-%S"`
echo $curDate
pg_dump "host=127.0.0.1 hostaddr=127.0.0.1 port=5432 user=postgres password=db_password dbname=db_name" > $curDate.sql
zip $curDate.zip $curDate.sql
rm -f $curDate.sql

猜你喜欢

转载自blog.csdn.net/jiangxuexuanshuang/article/details/88699924