postgresql启用归档

来源:互联网 发布:淘宝红包口令在哪里 编辑:程序博客网 时间:2024/04/29 08:34
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


0 0
原创粉丝点击