postgres
文章平均质量分 53
水滴男孩
这个作者很懒,什么都没留下…
展开
-
Postgres在线备份步骤
Postgres在线备份步骤:1.在线备份数据库:[postgres@localhost~]$ vi .bash_profileexportPGDATA=$HOME/pgdataexport BACKBASE=/home/postgres/wmpay_bakexportARCHIVE=/home/postgres/wmpay_archive_log[postgres@loc原创 2013-11-20 17:34:04 · 1244 阅读 · 0 评论 -
Postgres备份脚本
Postgres备份脚本 [root@localhost bak_linux]# vi linux_postgres_bak.sh#!/bin/sh #备份的文件放置的路径bak_path=/home/postgresBACKBASE=$bak_path/wmpay_baklog_file=$bak_path/$(date+%Y%m%d)#linux_postgre原创 2013-11-20 17:36:17 · 1766 阅读 · 0 评论 -
linux中postgres的备份脚本
#!/bin/sh##############################################################################创建$HOME/script目录,用于存放备份脚本和备份相关的文件。 ##创建$HOME/wmpay_bak 目录,用于存放数据库的备份文件。原创 2013-11-20 17:17:43 · 1287 阅读 · 0 评论 -
Postgres归档设置
建立备份目录[postgres@localhost~]$ mkdir wmpay_bak[postgres@localhost~]$ mkdir wmpay_archive_log[postgres@localhost~]$ lspayn_zhongdian.sql pgdata wmpay.20130415.dump wmpay_archive_log wmpay_bak原创 2013-11-20 17:33:28 · 1287 阅读 · 0 评论 -
postgres复制数据库
复制数据库[postgres@localhost ~]$ psql -c"create database abc" ----创建一个空库CREATE DATABASE[postgres@localhost ~]$ pg_dump portal |psql abc ----以流的方式,将portal数据库中的数据复制到abc库中原创 2013-11-21 15:22:47 · 3443 阅读 · 0 评论 -
Postgres的热备恢复
Postgres的热备恢复:连接数据库[postgres@localhost ~]$ psql wmpayWelcome to psql 8.3.3, the PostgreSQLinteractive terminal. Type: \copyright for distribution terms \h for help with SQL commands原创 2013-11-20 17:37:24 · 2389 阅读 · 0 评论 -
postgres客户端连接配置
配置监听地址和端口: vi/usr/local/pgsql/data/postgresql.conf ----此路径是默认安装的路径,我平时手工安装的路径是:/home/postgres/pgdata /postgresql.conf 取消以下两行的注释 listen_addresses = '*'原创 2013-11-21 15:27:19 · 2000 阅读 · 0 评论 -
postgres备份与恢复(导入/导出)
备份与恢复:压缩备份:[postgres@localhost~]$ pg_dump textdb | gzip > textdb.gz还原:[postgres@localhost~]$ gunzip -c textdb.gz | psql huruilong############################################只备份数据:[postgr原创 2013-11-21 15:21:57 · 1232 阅读 · 0 评论