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

Commitecb5492

Browse files
committed
Some documentation fix.
1 parent85e97a1 commitecb5492

File tree

1 file changed

+54
-44
lines changed

1 file changed

+54
-44
lines changed

‎doc/pg_arman.md

Lines changed: 54 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,15 @@
55
pg_arman - Backup and recovery manager for PostgreSQL
66

77
##SYNOPSIS
8-
8+
```
99
pg_arman [ OPTIONS ]
1010
{ init |
1111
backup |
1212
restore |
1313
show [ DATE | timeline ] |
1414
validate [ DATE ] |
1515
delete DATE }
16+
```
1617

1718
DATE is the start time of the target backup in ISO-format:
1819
(YYYY-MM-DD HH:MI:SS). Prefix match is used to compare DATE and backup
@@ -33,26 +34,26 @@ It proposes the following features:
3334

3435
##COMMANDS
3536

36-
pg_arman supports the following commands. See also*OPTIONS* for more
37+
pg_arman supports the following commands. See also**OPTIONS** for more
3738
details.
3839

39-
*init*::
40+
**init**:
4041
Initialize a backup catalog.
4142

42-
*backup*::
43+
**backup**:
4344
Take an online backup.
4445

45-
*restore*::
46+
**restore**:
4647
Perform restore.
4748

48-
*show*::
49+
**show**:
4950
Show backup history. The timeline option shows timeline of the backup
5051
and the parent's timeline for each backup.
5152

52-
*validate*::
53+
**validate**:
5354
Validate backup files.
5455

55-
*delete*::
56+
**delete**:
5657
Delete backup files.
5758

5859
###INITIALIZATION
@@ -64,7 +65,9 @@ are initialized, pg_arman can adjust the config file to the setting. In this
6465
case, you have to specify the database cluster path for PostgreSQL. Please
6566
specify it in PGDATA environmental variable or -D/--pgdata option.
6667

67-
$ pg_arman init -B /path/to/backup/
68+
```
69+
$ pg_arman init -B /path/to/backup/
70+
```
6871

6972
###BACKUP
7073

@@ -105,37 +108,42 @@ To reduce the number of command line arguments, you can set BACKUP_PATH,
105108
an environment variable, to the absolute path of the backup catalog and
106109
write default configuration into ${BACKUP_PATH}/pg_arman.ini.
107110

108-
$ cat $BACKUP_PATH/pg_arman.ini
109-
ARCLOG_PATH = /home/postgres/arclog
110-
BACKUP_MODE = FULL
111-
KEEP_DATA_GENERATIONS = 3
112-
KEEP_DATA_DAYS = 120
111+
```
112+
$ cat $BACKUP_PATH/pg_arman.ini
113+
ARCLOG_PATH = /home/postgres/arclog
114+
BACKUP_MODE = FULL
115+
KEEP_DATA_GENERATIONS = 3
116+
KEEP_DATA_DAYS = 120
117+
```
113118

114119
###TAKE A BACKUP
115120

116121
This example takes a full backup of the whole database. Then, it validates
117122
all unvalidated backups.
118-
119-
$ pg_arman backup --backup-mode=full
120-
$ pg_arman validate
123+
```
124+
$ pg_arman backup --backup-mode=full
125+
$ pg_arman validate
126+
```
121127

122128
###RESTORE FROM A BACKUP
123129

124130
Here are some commands to restore from a backup:
125131

126-
$ pg_ctl stop -m immediate
127-
$ pg_arman restore
128-
$ pg_ctl start
132+
```
133+
$ pg_ctl stop -m immediate
134+
$ pg_arman restore
135+
$ pg_ctl start
136+
```
129137

130138
###SHOW A BACKUP
131139
```
132-
$ pg_arman show
133-
===================================================================================
134-
Start Mode Current TLI Parent TLI Time Data Backup Status
135-
===================================================================================
136-
2013-12-25 03:02:31 PAGE 1 0 0m 203kB 67MB DONE
137-
2013-12-25 03:02:31 PAGE 1 0 0m 0B 0B ERROR
138-
2013-12-25 03:02:25 FULL 1 0 0m 33MB 364MB OK
140+
$ pg_arman show
141+
===================================================================================
142+
Start Mode Current TLI Parent TLI Time Data Backup Status
143+
===================================================================================
144+
2013-12-25 03:02:31 PAGE 1 0 0m 203kB 67MB DONE
145+
2013-12-25 03:02:31 PAGE 1 0 0m 0B 0B ERROR
146+
2013-12-25 03:02:25 FULL 1 0 0m 33MB 364MB OK
139147
```
140148
The fields are:
141149

@@ -158,21 +166,23 @@ The fields are:
158166

159167
When a date is specified, more details about a backup is retrieved:
160168

161-
$ pg_arman show '2011-11-27 19:15:45'
162-
# configuration
163-
BACKUP_MODE=FULL
164-
# result
165-
TIMELINEID=1
166-
START_LSN=0/08000020
167-
STOP_LSN=0/080000a0
168-
START_TIME='2011-11-27 19:15:45'
169-
END_TIME='2011-11-27 19:19:02'
170-
RECOVERY_XID=1759
171-
RECOVERY_TIME='2011-11-27 19:15:53'
172-
DATA_BYTES=25420184
173-
BLOCK_SIZE=8192
174-
XLOG_BLOCK_SIZE=8192
175-
STATUS=OK
169+
```
170+
$ pg_arman show '2011-11-27 19:15:45'
171+
# configuration
172+
BACKUP_MODE=FULL
173+
# result
174+
TIMELINEID=1
175+
START_LSN=0/08000020
176+
STOP_LSN=0/080000a0
177+
START_TIME='2011-11-27 19:15:45'
178+
END_TIME='2011-11-27 19:19:02'
179+
RECOVERY_XID=1759
180+
RECOVERY_TIME='2011-11-27 19:15:53'
181+
DATA_BYTES=25420184
182+
BLOCK_SIZE=8192
183+
XLOG_BLOCK_SIZE=8192
184+
STATUS=OK
185+
```
176186

177187
You can check the "RECOVERY_XID" and "RECOVERY_TIME" which are used for
178188
restore option "--recovery-target-xid", "--recovery-target-time".
@@ -192,11 +202,11 @@ details.
192202
As a general rule, paths for data location need to be specified as
193203
absolute paths; relative paths are not allowed.
194204

195-
*-D*_PATH_ /*--pgdata*=_PATH_::
205+
**-D***PATH* /**--pgdata**=*PATH*:
196206
The absolute path of database cluster. Required on backup and
197207
restore.
198208

199-
*-A*_PATH_ /*--arclog-path*=_PATH_::
209+
**-A***PATH* /**--arclog-path**=*PATH*:
200210
The absolute path of archive WAL directory. Required for restore
201211
and show command.
202212

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp