File: afrestore.8.in

package info (click to toggle)
afbackup 3.1beta1-1
  • links: PTS
  • area: main
  • in suites: slink
  • size: 1,500 kB
  • ctags: 1,685
  • sloc: ansic: 22,406; csh: 3,597; tcl: 964; sh: 403; makefile: 200
file content (238 lines) | stat: -rw-r--r-- 9,427 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
.TH AFRESTORE 8 "1998 February 9" "Debian Project"
.SH NAME
afrestore \- the restore utility of the afbackup package
.SH SYNOPSIS
.B afrestore
[-nl] [ -<past-backup-no> ] [ -C <root-directory> ]
[ -h <backuphosts> ] [ -P <backup-ports> ]
[ -c <configuration-file> ]
[ -A "<after-date>" ] [ -B "<before-date>" ]
[ -I <indexfile-part> ] [ -V <var-directory> ]
[ -k <encryption-key-file> ]
[ -z <compress-cmd> <uncompress-cmd> ]
[ -p ] <path-pattern> [ [ -p ] <path-patterns> [ ... ] ]
.br
.B afrestore
-a [ -<past-backup-no> ] [ -C <root-directory> ]
[ -h <backuphosts> ] [ -P <backup-ports> ]
[ -c <configuration-file> ]
[ -I <indexfile-part> ] [ -V <var-directory> ]
[ -k <encryption-key-file> ]
[ -z <compress-cmd> <uncompress-cmd> ]
.br
.B afrestore
-{ef} [ -C <root-directory> ] [ -h <backuphosts> ]
[ -P <backup-ports> ] [ -V <var-directory> ]
[ -z <compress-cmd> <uncompress-cmd> ]
[ -k <encryption-key-file> ]
[ -c <configuration-file> ] < <startup-info-file>
.br
.B afrestore
-E [ -nl ] [ -C <root-directory> ] [ -h <backuphosts> ]
[ -P <backup-ports> ] [ -V <var-directory> ]
[ -z <compress-cmd> <uncompress-cmd> ]
[ -k <encryption-key-file> ]
[ -c <configuration-file> ] [ -H <orig-host> ]
[ <cartridge-number> | <cartridge-range> ] ... ]
.SH DESCRIPTION
The first form can be used for restoring selected pieces of
a certain previous backup run. If no option of the type
.I -<past-backup-no>
is supplied (e.g. -2 ), the most recently
made backup is accessed. If an option like this is given,
the backup system tries to extract the files from the backup
before ( -1 ) or even an earlier one. This requires, that
enough file- and directory-name-logging is provided. This
can be done with the client-side configuration parameter
NumIndexesToStore (See: afclient.conf(8)). The parameters
.I <path-pattern>
indicate, which files and directories should be restored. An
asterisk is implicitely put before and after the
.I <path-pattern>,
so it is assumed to be a substring of the path. This can be
prevented preceding the
.I <path-pattern>
with the option -p.
These may be wildcards for the full path name leading to the
file relative to the directory, to that the client changes
before starting any backup or restore (See under the parameter
RootDirectory under afclient.conf(8)).
Note, that you have to put these into 
quotes, if you are using wildcards to prevent substutition. It
is a bad idea to restore a total backup entering: restore "*"
This leads to a huge filelist to be processed by the client,
what might plug up memory and/or temporary space in some
filesystem. Instead you should use the second form with the
option -a, what restores a total backup. The third form
restores without looking for filename log files. Instead it
reads the standard input for information, where to extract
from. The format expected at standard input is the same as
produced by incr_backup or full_backup, if the configuration
option StartupInfoProgram is used. The given program is then
supplied with the appropriate information and should write
it to some place outside the local host, so that it will not
be affected by a hard crash (see: StartupInfoProgram in
afclient.conf(8)). The fourth form scans the cartridges (if supplied)
on the given servers (if supplied, eventually with alternate
given port numbers - see below for the format, how to specify
cartridge/host/port-triples) for backups done from the host,
where the restore program is started and restores everything
it finds. The functionality is similar to -e, but no input has
to be supplied. If the client's hostname has changed or restore
should be done on another host, the original hostname must be
supplied with the -H option. Otherwise nothing or the wrong
stuff will be restored. Scanning the cartridges can take a lot
of time, but it should be several minutes, not hours.
Cartridges can be supplied in three forms as arguments: simple
numbers, ranges (e. g. as 3-5 without spaces), and ranges
relative to the actual backup writing position (e. g. as -3).
In the latter case -0 means the cartridge, that will be written
to next time i.e. that holds the actual writing point. -2 stands
for the latest 3 cartridges. To indicate, that a cartridge is
located at a certain backup server, maybe with a special port
number (if there are several backup servers), the cartridge
number or range can be followed by the at-character @, optionally
followed by the percent character % and the port number, e. g.
3-5@buhost%2989 . No whitespace is allowed in such a specifier.
If no port is given, the default port is assumed (2988). If no
hostname is given, the default backup server is used. Default
backup server is the first one in the list, that is configured
in the parameter file or overriden by the option -h. Any number
of ranges or numbers can be supplied, overlapping duplicates are
ignored. If no cartridge numbers are given, the program searches
backward from the actual writing position on each configured
backup server until it thinks, it has enough backups found, or
all cartridges on that server have been tried. The found backups
are sorted in the correct order (using the stored backup time)
and afterwards everything found is restored.
This form of the command needs
no information at all for an emergency restore.
If the configuration file is not supplied
explicitely,
then it is searched for in the @clientlibdir@ and if not
found there the files /etc/buclient.conf and
/etc/afbackup/client.conf are tried.
.PP
.TP
.B -A <date> 
restore files modified after the given date. The date
should be put into quotes, cause it usually contains
whitespace. Valid formats are e.g.:
.br
  MM/DD/YYYY hh:mm:ss
.br
  DD.MM.YYYY hh:mm:ss
.br         
or the formats produced by ctime(3) or date(1). The
year may be supplied in two digits or in the non-US-
formats be omitted, then the current year is assumed.
The seconds may also be omitted (hh:mm), the whole
time may be left off, then 00:00 is assumed. Thus
the shortest valid format is DD.MM
.TP
.B -B <date>
restore files modified before the given date. See
.B -A 
for the valid date formats
.TP
.B -C <rootdir>
change to the given root-directory before restoring
files instead of the one specified in the client
side configuration file. If this directory does not
exist, it is created
.TP
.B -c <configfile>
use the given file for configuration information
.TP
.B -e   
restore all files from the previous backup in an
emergency case without looking for the filename
logfiles, which are also restored
.TP
.B -f   
restore only the filename logfiles in an emergency
case
.TP
.B -H <orighost>
(in combination with -E) Restore everything saved
from the given host, if different from the one,
where the program is running. Domainnames or anything
behind (and including) a dot in this hostname is
ignored
.TP
.B -h <hostnames>
Use the given list of hosts as backup servers. This
list is used only, if no hostname information can
be found as associated with the actual filesystem
entry, that should be restored. The first host in
this list is the default server, if no hostname
information at all can be found. If -E is given
and no cartridge number is supplied at all, all
hosts in this list are tried one after the other.
The hostnames in this list can be separated by
whitespace and/or commas
.TP
.B -I <idx-prefix>
The first part of the filename, the names of the
stored files and directories are written to. The
current total backup number is appended (that
increments each start of a full backup). If these
files undergo compression, .z is appended
.TP
.B -k <file>
Use the contents of the given file as encryption
key for authenticating to the server
.TP
.B -l   
do not restore anything, just list the names of
the files and/or directories, that fit the supplied
path-part(s); in combination with -E: just scan the
given tape(s) and printout the minimum restore info,
that can be read by restore -e
.TP
.B -n   
do not restore anything, just printout a message,
how many files and/or directories fit the supplied
path-part(s); in combination with -E: just scan the
given tape(s) and printout, what backups have been
written there
.TP
.B -P <portnos>
The list of port numbers for the backup servers
either configured in the parameter file or supplied
with the -h option. This list is used only, if no
port number information can be found as associated
with the actual filesystem entry, that should be
restored. The port numbers supplied here are associated
with the backup server names by position.
The port numbers in this list can be separated by
whitespace and/or commas
.TP
.B -V <var-dir>
The directory, where varying files are put
.TP
.B -z <zipcmd> <unzipcmd>
The commands to use for compress and uncompress. If
a command comprises of several words, it must be
put in quotes
.PP
I suggest to run restore with the 
.B -l 
option before really going
to restore anything. So you see, what files will be generated,
without overwriting existing ones unintendedly.
.SH FILES
.IP @clientlibdir@/@clientconf@
Client configuration file
.IP @clientlogdir@
The directory for logging the client backups
.IP @clientvardir@
Some internal state information of the client backups.
.SH SEE ALSO
afclientconfig(8), xafclientconfig(8), full_backup(8),
incr_backup(8), afverify(8), afrestore(8), print_errors(8),
afclient.conf(8), afserver.conf(8),
tar(1) 
.SH AUTHOR
.B afbackup 
was written by Albert Fluegel (af@muc.de).