设为首页 加入收藏

TOP

Postgres逻辑备份脚本(二)
2014-11-23 19:56:56 来源: 作者: 【 】 浏览:54
Tags:Postgres 逻辑 备份 脚本
copy (select * from schema_name.table_name where crt_time>=$date) to '/home/postgres/tbl.bak'"
psql -d db_kenyon -c"copy (select * from schema_name.table_name where id>=$id) to '/home/postgres/tbl.bak'"
4.crontab定时调度
50 1 * * * sh /home/postgres/script/DB_backup.sh >> /home/postgres/backup/backup.log 2>&1
5.说明
上述脚本相对简单,还可以加入其它一些异常判断和邮件发送等。
首页 上一页 1 2 下一页 尾页 2/2/2
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇教你快速掌握Oracle数据库结构的1.. 下一篇mongodb数据库的备份与恢复

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: