summaryrefslogtreecommitdiffstats
path: root/lpsm_recover.3.in
blob: ec71151345fea4ea3b4ea91e4d2266bb57e76774 (plain)
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
.\" -*- nroff -*- ---------------------------------------------------------
.\"   
.\"   Copyright 2001-2008 H. Peter Anvin - All Rights Reserved
.\"
.\"   This program is free software; you can redistribute it and/or modify
.\"   it under the terms of the GNU Lesser General Public License as
.\"   published by the Free Software Foundation, Inc.,
.\"   59 Temple Place Ste 330, Bostom MA 02111-1307, USA; version 2.1,
.\"   incorporated herein by reference.
.\"
.\" -----------------------------------------------------------------------
.TH LPSM_RECOVER 3  "25 October 2001" "LPSM @@VERSION@@" "Linux Persistent Memory"
.SH NAME
lpsm_recover \- Perform offline recovery of an LPSM database
.SH SYNOPSIS
.nf
.B #include <lpsm.h>
.sp
.BI "int lpsm_recover(const char *" datafile ", const char *" logfile ");"
.nl
.fi
.SH DESCRIPTION
.B lpsm_recover()
performs an offline log recovery of the specified pair of LPSM files.
After log recovery is complete, the contents of
.I datafile
is identical to the contents of the LPSM arena, and
.I logfile
is truncated to its minimum size.
.PP
It is safe to call
.B lpsm_recover()
while a different arena is mapped.
.SH "RETURN VALUES"
.B lpsm_recover()
returns 0 on success and -1 on failure; in the latter case
.I errno
is set to indicate the nature of the error.
.SH "NOTES"
It is not required to perform a log recovery before calling
.B lpsm_init()
or
.BR lpsm_arena_init() .
These routines perform log recovery as part of their standard startup
sequence.
.SH "SEE ALSO"
.BR lpsm_init (3),
.BR lpsm_arena_init (3),
.BR lpsm (7).