Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3791d26

Browse files
committed
Update archive_command example to use || test, rather than if [].
1 parent8e179ae commit3791d26

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎doc/src/sgml/backup.sgml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/backup.sgml,v 2.111 2007/12/1704:30:05 tgl Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/backup.sgml,v 2.112 2007/12/1709:03:52 momjian Exp $ -->
22

33
<chapter id="backup">
44
<title>Backup and Restore</title>
@@ -1290,7 +1290,7 @@ restore_command = 'copy /mnt/server/archivedir/%f "%p"' # Windows
12901290
<literal>on</>, and set up an <varname>archive_command</> that performs
12911291
archiving only when a <quote>switch file</> exists. For example:
12921292
<programlisting>
1293-
archive_command = 'if [ -f /var/lib/pgsql/backup_in_progress]; thencp -i %p /var/lib/pgsql/archive/%f &lt;/dev/null ; fi'
1293+
archive_command = 'test ! -f /var/lib/pgsql/backup_in_progress||cp -i %p /var/lib/pgsql/archive/%f &lt;/dev/null'
12941294
</programlisting>
12951295
This command will perform archiving when
12961296
<filename>/var/lib/pgsql/backup_in_progress</> exists, and otherwise

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp