File: hdup.1

package info (click to toggle)
hdup 2.0.7-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 616 kB
  • ctags: 351
  • sloc: ansic: 3,461; sh: 2,743; perl: 218; makefile: 154
file content (281 lines) | stat: -rw-r--r-- 8,510 bytes parent folder | download
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
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
.\" @(#)hdup.1 1.7.0 20-Mar-2003 OF; 
.TH hdup 1 "18 Mar 2003"
.SH NAME
hdup \- harddisk duplicator/harddisk backupper - backup to harddisk
.SH SYNOPSIS
.B hdup
[
.IR OPTION
]
.IR SCHEME 
.IR HOST 
[
.IR @USER@REMOTEHOST
]
\fI(1st format)\fR
.br
.B hdup
[
.IR OPTION
]
.IR restore
.IR HOST
.IR DATE
.IR DIRECTORY
[
.IR @USER@REMOTEHOST
]
\fI(2nd format)\fR

.SH DESCRIPTION
\fBHdup\fR is used to backup a filesystem. Features include:
.PD 1
.TP
.B o
incremental backups: monthly, weekly and daily dumps,
.TP
.B o
encryption of the archive (via \fBmcrypt\fR or \fBGPG\fR),
.TP
.B o
compression of the archive (bzip/gzip/lzop/none),
.TP
.B o
possibility to transfer the archive to a remote host, 
.TP
.B o
possibility to restore the archive from a remote host, 
.TP
.B o
ability to split up archives,
.TP
.B o
no obscure archive format (it is a normal compressed tar file), and
.TP
.B o
simple to use.
.PP
The behaviour of \fBhdup\fR is controlled by its configuration file (see
\fBhdup.conf(5)\fR). Internally \fBhdup\fR uses \fBGNU tar\fR to actually create
the backups.

.SS First format
When using the 1st format \fBhdup\fR performs a backup. Remember: \fBhdup\fR
pushes a backup \fIfrom\fR the localhost \fIto\fR the remote host.

The sort of backup is specified by \fISCHEME\fR:
.TP 
\fBmonthly\fR
Make a full (null) dump of the filesystem.
.TP 
\fBweekly\fR
Make an incremental dump of the filesystem relative to the latest
monthly dump. If \fBhdup\fR cannot find a monthly dump it will complain, unless
\fIalways backup\fR is on. Then a monthly dump will be performed.
.TP 
\fBdaily\fR
Make an incremental dump of the filesystem relative to the latest
weekly dump. If \fBhdup\fR cannot find a weekly dump it will complain, unless
\fIalways backup\fR is on. Then a weekly dump will be performed.

.PP
\fIHOST\fR is the host of which \fBhdup\fR should perform the backup. This
should match a '[HOST]' statement in the configuration file. The
directories of that host (specified with 'dir = \fIdir1\fR, \fIdir2\fR', ...) will
be backed up to the directory specified with 'archive dir = \fIdir\fR'. 
If \fIHOST\fR is not found no backup will be made.

.PP
\fI@USER@REMOTEHOST\fR is the host to which the archive should be
transfered. This must include the user name. E.g \fI@miekg@elektron.atoom.net. 
It is illegal to specify the colon ':'. \fBhdup\fR must be
present on the remote host. The location of this remote \fBhdup\fR is specified using
\fIremote hdup\fR.

Any program capable of transferring files can used for this purpose. Currently
tested is \fBssh\fR. Other programs like \fBrsync\fR (not tested) may also work. Any program
with the following characteristics will do:
.TP
.B o
must be usable as a filter (read from stdin, write to stdout),
.TP
.B o
must support \fIuser@remotehost\fR syntax.

.SS Second format
When using the 2nd format a previous backed up filesystem is restored.
Remember: \fBhdup\fR pushes a restore \fIfrom\fR the remote \fIto\fR 
the local host. This is opposite from the backup operation!

.PP
\fIHOST\fR is the host who's archives should be restored.

.PP
\fIDATE\fR everything up to this date will be restored. \fBhdup\fR will
look for the most recent monthly archive, then the most recent weekly
and finally for the daily to pad up to date given. The \fIDATE\fR can
either be specified as DD-MM-YYYY (date spec = default), as YYYY-MM-DD
(date spec = iso) or as MM-DD-YYYY (date spec = american). This is controlled
from the configuration file. 

A special date is 'static' which instructs
\fBhdup\fR to look in the 'static' directory. This is used when 'no history =
yes'. This is dangerous to use because \fBhdup\fR will overwrite the old backup
file with the new one. When your system crashes during the overwrite you have
no backup at all! Only use this when you \fIreally\fR don't have room for two
monthly backups.

Another special date is 'today' which instructs \fBhdup\fR to use the current date.

.PP
\fIDIRECTORY\fR tells \fBhdup\fR to which directory the archive should
be untarred to. Be very careful when running \fBhdup\fR as root and
specifying '/' as the directory. Version 1.4 and above refuses to restore to '/'.
This can be overridden by specifying 'force = on/yes' in the configuration.

.PP
\fI@USER@REMOTEHOST\fR is the host to which the archive should be restored.
This must include the user name. E.g \fI@miekg@elektron.atoom.net.
As as version 1.6.6 it is illegal to specify the colon ':'. On the remosthost
and in \fIDIRECTORY\fR the archive is restored. \fBhdup\fR must be present 
on the remote host.

.SS Status message
When \fBhdup\fR is finished with its current operation it will print
an overview message:

.TS
tab ($);
l l.
Hdup version.:  1.6.6

Host.........:  elektron
Date.........:  2003-02-02
Scheme.......:  monthly
Archive......:  elektron.2003-02-02.monthly.tar.gz
Encryption...:  no
Archive size.:  257k
Elapsed......:  0:01:27
Status.......:  successfully performed backup
.TE
.PP
Which can be mailed to you via cron.

.SH OPTIONS
.TP
\fB\-c, --config=\fIconfig\fR
location of the configuration file. The default location of \fBhdup\fR's
configuration file is \fI/etc/hdup/hdup.conf\fR.
.TP
\fB\-s, --specific=\fIfile\fR
restore a specific file from an archive. \fIfile\fR must be the \fBfull\fI path
to the file, relative paths will not work.
.TP
\fB\-i, --ignore-tar
Ignore tar errors when restoring.
.TP
\fB\-I, --ignore-conf
Ignore errors in the configuration file.
.TP
\fB\-d, --dryrun
Do a dryrun - don't do anything with the filesystem
.TP
\fB\-q, --quiet
suppress the output of the subprocesses (like 'tar' and 'ssh').
.TP
\fB\-q \-q, --quiet --quiet
suppress the logging output from \fBhdup\fR.
.TP
\fB\-q \-q \-q, --quiet --quiet --quiet
no logging at all. Even no overview message.
.TP
\fB\-V
be more verbose.
.TP
\fB\-V \-V
be even more verbose.
.TP
\fB\-h, --help
a help message.
.TP
\fB\-v, --version
show the version of hdup.

.TP
\fB\-D, --debug
Show a lot of information which can aid debugging.

.PP
The -V and -q options do \fInot\fR effect each other. A '-qqq -VV' option list
will mean that \fBhdup\fR will show what is run, but nothing else (no overview message
and no warning nor errors).

.SH ENCRYPTION
\fBhdup\fR can encrypt the archives, \fBmcrypt\fR is used for the actual
encryption. As of version 1.6.25 \fBGPG\fR can also be used to encrypt
the archive. Note that currently remotely restoring a GPG encrypted archives
is not working.

.SS mcrypt
With \fBmcrypt --list\fR you get a list of the algorithms
mcrypt supports:

.TS
tab (@); 
l l.
\.\.\.
\fIserpent\fR (32): cbc cfb ctr ecb ncfb ofb nofb 
\fIwake\fR (32): stream 
\fIloki97\fR (32): cbc cfb ctr ecb ncfb ofb nofb 
\fIrijndael-128\fR (32): cbc cfb ctr ecb ncfb ofb nofb 
\fIrijndael-192\fR (32): cbc cfb ctr ecb ncfb ofb nofb 
\.\.\.
.TE
.PP 
If you want to use \fIloki97\fR you specify \fBalgorithm = loki97\fR in
hdup.conf. The same goes for all the other algorithms.

.SS GPG
To use \fBGPG\fR the following is needed. Set \fBalgorithm = gpg\fR and
\fBkey = user ID of key\fR. In my case I've created a GPG key with user ID
of 'miekg' so I use:
.br
\fBalgorithm = gpg\fR
.br
\fBkey = miekg\fR
.br
The \fBkey\fR is supplied to \fBgpg\fR with the \fI-r\fR argument. See the manpage 
of \fBgpg\fR for more details.
.PP
When restoring a GPG encrypted archive you will be prompted to unlock your
private key.

.SH AUTHOR
Written by Miek Gieben. Wouter van Gils helped a lot with testing pre-release
versions. User feedback is appreciated.

.SH REPORTING BUGS
Report bugs to <hdup-user@miek.nl>. 

.SH BUGS
The %a expansion is not always the same in the prerun and postrun scripts (when
using encryption).

.SH LIMITATIONS
Under Linux kernel version 2.2 the archive size cannot exceed two (2) Gigabyte.
If you need larger archives sizes you should upgrade your kernel. You can
however solve this by using \fIchunk size\fR. Just define your maximum allowed
size, something like \fIchunk size = 1800M\fR and you're set.
.PP
If you encrypt archives and want to restore them, you are forced to use one
encryption scheme for all the backups. \fBhdup\fR does not store the key
and algorithm with the archive, thus it is impossible to restore archives that
use different keys and algorithms.

.SH COPYRIGHT
Copyright (C) 2001-2005 Miek Gieben. This is free software. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.

.SH SEE ALSO
\fBhdup.conf(5)\fR for information about \fBhdup\fR's configuration file.