mdb_copy.1 1.64 KB
Newer Older
1
.TH MDB_COPY 1 "2017/07/31" "LMDB 0.9.70"
Quanah Gibson-Mount's avatar
Quanah Gibson-Mount committed
2
.\" Copyright 2012-2020 Howard Chu, Symas Corp. All Rights Reserved.
Howard Chu's avatar
Howard Chu committed
3
4
5
6
.\" Copying restrictions apply.  See COPYRIGHT/LICENSE.
.SH NAME
mdb_copy \- LMDB environment copy tool
.SH SYNOPSIS
Howard Chu's avatar
Howard Chu committed
7
.B mdb_copy
Hallvard Furuseth's avatar
Hallvard Furuseth committed
8
[\c
Howard Chu's avatar
Howard Chu committed
9
10
.BR \-V ]
[\c
Howard Chu's avatar
Howard Chu committed
11
12
.BR \-c ]
[\c
Hallvard Furuseth's avatar
Hallvard Furuseth committed
13
.BR \-n ]
14
15
[\c
.BR \-v ]
Hallvard Furuseth's avatar
Hallvard Furuseth committed
16
17
18
.B srcpath
[\c
.BR dstpath ]
Howard Chu's avatar
Howard Chu committed
19
20
21
22
23
.SH DESCRIPTION
The
.B mdb_copy
utility copies an LMDB environment. The environment can
be copied regardless of whether it is currently in use.
24
No lockfile is created, since it gets recreated at need.
Howard Chu's avatar
Howard Chu committed
25
26
27
28
29
30

If
.I dstpath
is specified it must be the path of an empty directory
for storing the backup. Otherwise, the backup will be
written to stdout.
31

Hallvard Furuseth's avatar
Hallvard Furuseth committed
32
.SH OPTIONS
Howard Chu's avatar
Howard Chu committed
33
34
35
36
.TP
.BR \-V
Write the library version number to the standard output, and exit.
.TP
Howard Chu's avatar
Howard Chu committed
37
38
39
40
.BR \-c
Compact while copying. Only current data pages will be copied; freed
or unused pages will be omitted from the copy. This option will
slow down the backup process as it is more CPU-intensive.
41
Currently it fails if the environment has suffered a page leak.
Howard Chu's avatar
Howard Chu committed
42
.TP
Hallvard Furuseth's avatar
Hallvard Furuseth committed
43
44
.BR \-n
Open LDMB environment(s) which do not use subdirectories.
45
46
47
48
.TP
.BR \-v
Use the previous environment state instead of the latest state.
This may be useful if the latest state has been corrupted.
Hallvard Furuseth's avatar
Hallvard Furuseth committed
49

Howard Chu's avatar
Howard Chu committed
50
51
52
53
.SH DIAGNOSTICS
Exit status is zero if no errors occur.
Errors result in a non-zero exit status and
a diagnostic message being written to standard error.
54
55
56
57
.SH CAVEATS
This utility can trigger significant file size growth if run
in parallel with write transactions, because pages which they
free during copying cannot be reused until the copy is done.
Howard Chu's avatar
Howard Chu committed
58
59
60
61
.SH "SEE ALSO"
.BR mdb_stat (1)
.SH AUTHOR
Howard Chu of Symas Corporation <http://www.symas.com>