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>
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>
16 <refname>tdbbackup</refname>
17 <refpurpose>tool for backing up and for validating the integrity of samba .tdb files</refpurpose>
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>
32 <title>DESCRIPTION</title>
34 <para>This tool is part of the <citerefentry><refentrytitle>samba</refentrytitle>
35 <manvolnum>1</manvolnum></citerefentry> suite.</para>
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.
46 <title>OPTIONS</title>
58 <term>-s suffix</term>
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.
69 The <command>-v</command> will check the database for damages (corrupt data)
70 which if detected causes the backup to be restored.
75 <term>-n hashsize</term>
77 The <command>-n</command> option sets the hash size for the new backup tdb.
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
97 <title>COMMANDS</title>
99 <para><emphasis>GENERAL INFORMATION</emphasis></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:
107 <para>tdbbackup [-s suffix] *.tdb</para>
110 Before restarting samba the following command may be run to validate .tdb files:
113 <para>tdbbackup -v [-s suffix] *.tdb</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:
122 <command>secrets.tdb</command> - usual location is in the /usr/local/samba/private
123 directory, or on some systems in /etc/samba.
127 <command>passdb.tdb</command> - usual location is in the /usr/local/samba/private
128 directory, or on some systems in /etc/samba.
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.
140 <title>VERSION</title>
142 <para>This man page is correct for version 3 of the Samba suite.</para>
146 <title>AUTHOR</title>
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.
154 <para>The tdbbackup man page was written by John H Terpstra.</para>