tdb/tools: add documentation for the tdbbackup -n option
[samba.git] / lib / tdb / man / tdbbackup.8.xml
1 <?xml version="1.0" encoding="iso-8859-1"?>
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
3 <refentry id="tdbbackup.8">
4 <refentryinfo><date>2015-04-25</date></refentryinfo>
5
6 <refmeta>
7         <refentrytitle>tdbbackup</refentrytitle>
8         <manvolnum>8</manvolnum>
9         <refmiscinfo class="source">Samba</refmiscinfo>
10         <refmiscinfo class="manual">System Administration tools</refmiscinfo>
11         <refmiscinfo class="version">3.6</refmiscinfo>
12 </refmeta>
13
14
15 <refnamediv>
16         <refname>tdbbackup</refname>
17         <refpurpose>tool for backing up and for validating the integrity of samba .tdb files</refpurpose>
18 </refnamediv>
19
20 <refsynopsisdiv>
21         <cmdsynopsis>
22                 <command>tdbbackup</command>
23                 <arg choice="opt">-s suffix</arg>
24                 <arg choice="opt">-v</arg>
25                 <arg choice="opt">-h</arg>
26                 <arg choice="opt">-n hashsize</arg>
27                 <arg choice="opt">-l</arg>
28         </cmdsynopsis>
29 </refsynopsisdiv>
30
31 <refsect1>
32         <title>DESCRIPTION</title>
33
34         <para>This tool is part of the <citerefentry><refentrytitle>samba</refentrytitle>
35         <manvolnum>1</manvolnum></citerefentry> suite.</para>
36
37         <para><command>tdbbackup</command> is a tool that may be used to backup samba .tdb
38         files. This tool may also be used to verify the integrity of the .tdb files prior
39         to samba startup or during normal operation. If it finds file damage and it finds
40         a prior backup the backup file will be restored.
41         </para>
42 </refsect1>
43
44
45 <refsect1>
46         <title>OPTIONS</title>
47
48         <variablelist>
49
50                 <varlistentry>
51                 <term>-h</term>
52                 <listitem><para>
53                 Get help information.
54                 </para></listitem>
55                 </varlistentry>
56
57                 <varlistentry>
58                 <term>-s suffix</term>
59                 <listitem><para>
60                 The <command>-s</command> option allows the administrator to specify a file
61                 backup extension. This way it is possible to keep a history of tdb backup
62                 files by using a new suffix for each backup.
63                 </para> </listitem>
64                 </varlistentry>
65
66                 <varlistentry>
67                 <term>-v</term>
68                 <listitem><para>
69                 The <command>-v</command> will check the database for damages (corrupt data)
70                 which if detected causes the backup to be restored.
71                 </para></listitem>
72                 </varlistentry>
73
74                 <varlistentry>
75                 <term>-n hashsize</term>
76                 <listitem><para>
77                 The <command>-n</command> option sets the hash size for the new backup tdb.
78                 </para></listitem>
79                 </varlistentry>
80
81                 <varlistentry>
82                 <term>-l</term>
83                 <listitem><para>
84                 This options disables any locking, by passing TDB_NOLOCK
85                 to tdb_open_ex(). Only use this for database files which
86                 are not used by any other process! And also only if it is otherwise not
87                 possible to open the database, e.g. databases which were created with
88                 mutex locking.
89                 </para></listitem>
90                 </varlistentry>
91
92         </variablelist>
93 </refsect1>
94
95
96 <refsect1>
97         <title>COMMANDS</title>
98
99         <para><emphasis>GENERAL INFORMATION</emphasis></para>
100
101         <para>
102         The <command>tdbbackup</command> utility can safely be run at any time. It was designed so
103         that it can be used at any time to validate the integrity of tdb files, even during Samba
104         operation. Typical usage for the command will be:
105         </para>
106
107         <para>tdbbackup [-s suffix] *.tdb</para>
108
109         <para>
110         Before restarting samba the following command may be run to validate .tdb files:
111         </para>
112
113         <para>tdbbackup -v [-s suffix] *.tdb</para>
114
115         <para>
116         Samba .tdb files are stored in various locations, be sure to run backup all
117         .tdb file on the system. Important files includes:
118         </para>
119
120         <itemizedlist>
121                 <listitem><para>
122                 <command>secrets.tdb</command> - usual location is in the /usr/local/samba/private
123                 directory, or on some systems in /etc/samba.
124                 </para></listitem>
125
126                 <listitem><para>
127                 <command>passdb.tdb</command> - usual location is in the /usr/local/samba/private
128                 directory, or on some systems in /etc/samba.
129                 </para></listitem>
130
131                 <listitem><para>
132                 <command>*.tdb</command> located in the /usr/local/samba/var directory or on some
133                 systems in the /var/cache or /var/lib/samba directories.
134                 </para></listitem>
135         </itemizedlist>
136
137 </refsect1>
138
139 <refsect1>
140         <title>VERSION</title>
141
142         <para>This man page is correct for version 3 of the Samba suite.</para>
143 </refsect1>
144
145 <refsect1>
146         <title>AUTHOR</title>
147
148         <para>
149         The original Samba software and related utilities were created by Andrew Tridgell.
150         Samba is now developed by the Samba Team as an Open Source project similar to the way
151         the Linux kernel is developed.
152         </para>
153
154         <para>The tdbbackup man page was written by John H Terpstra.</para>
155 </refsect1>
156
157 </refentry>