您的位置:首页 > 数据库

postgresql启用归档

2016-02-05 15:49 459 查看
To enable WAL archiving, set the wal_level    configuration parameter to archive or higher,    archive_mode to on,    and specify the shell command to use in the archive_command configuration parameter.  In practice    these settings will always be placed in
the    postgresql.conf file.    In archive_command,    %p is replaced by the path name of the file to    archive, while %f is replaced by only the file name.    (The path name is relative to the current working directory,    i.e., the cluster's data directory.)
   Use %% if you need to embed an actual %    character in the command.  The simplest useful command is something    like:

archive_command = 'test ! -f /mnt/server/archivedir/%f && cp %p /mnt/server/archivedir/%f'  # Unix
archive_command = 'copy "%p" "C:\\server\\archivedir\\%f"'  # Windows
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: