Skip to content

Commit

Permalink
dbcopy: introduced manpage for bareos-dbcopy
Browse files Browse the repository at this point in the history
- the manpage is being build by sphinx-build.
  • Loading branch information
pstorz committed Jan 31, 2020
1 parent 8dfeb6f commit e21afb7
Show file tree
Hide file tree
Showing 13 changed files with 142 additions and 4 deletions.
1 change: 1 addition & 0 deletions core/debian/bareos-database-tools.install.in
Expand Up @@ -2,4 +2,5 @@
/usr/sbin/bareos-dbcopy
/usr/sbin/bscan
/usr/share/man/man8/bareos-dbcheck.8*
/usr/share/man/man8/bareos-dbcopy.8*
/usr/share/man/man8/bscan.8*
3 changes: 2 additions & 1 deletion core/manpages/CMakeLists.txt
@@ -1,6 +1,6 @@
# BAREOS® - Backup Archiving REcovery Open Sourced
#
# Copyright (C) 2017-2019 Bareos GmbH & Co. KG
# Copyright (C) 2017-2020 Bareos GmbH & Co. KG
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of version three of the GNU Affero General Public
Expand Down Expand Up @@ -33,6 +33,7 @@ if(NOT client-only)
bareos-sd.8
bcopy.8
bareos-dbcheck.8
bareos-dbcopy.8
bextract.8
bls.8
bscan.8
Expand Down
78 changes: 78 additions & 0 deletions core/manpages/bareos-dbcopy.8
@@ -0,0 +1,78 @@
.\" Man page generated from reStructuredText.
.
.TH "BAREOS-DBCOPY" "8" "Jan 28, 2020" "" "Bareos Documentation"
.SH NAME
bareos-dbcopy \- bareos-dbcopy
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.SH SYNOPSIS
.sp
\fBbareos\-dbcopy\fP [\fIoptions\fP] <\fIsourcecatalog\fP> <\fIdestinationcatalog\fP>
.SH DESCRIPTION
.sp
\fBbareos\-dbcopy\fP copies the data of all tables from the Bareos catalog
\fB<sourcecatalog>\fP into the Bareos catalog \fB<destinationcatalog>\fP\&.
.sp
\fBbareos\-dbcopy\fP reads the Bareos director configuration from
\fB/etc/bareos\fP to load the catalog settings. A configuration resource
for both \fB<sourcecatalog>\fP and \fB<destinationcatalog>\fP must exist.
.sp
The main use of \fBbareos\-dbcopy\fP is to migrate an existing Bareos
installation from a mysql/mariadb catalog to postgresql.
.sp
\fBbareos\-dbcopy\fP only copies the data over to the new catalog.
The \fB<destinationcatalog>\fP needs to be created and initialized with the
correct tables and columns via \fBcreate_bareos_database\fP,
\fBmake_bareos_tables\fP and \fBgrant_bareos_privileges\fP\&.
Both \fBsourcecatalog\fP and \fBdestinationcatalog\fP need to have the same database
scheme version, i.e. have the schema from the identical Bareos version..
.SH OPTIONS
.INDENT 0.0
.TP
.B \-c <configuration directory>
bareos\-dbcopy reads the director configuration from the given
<configuration directory> instead of \fB/etc/bareos\fP
.UNINDENT
.INDENT 0.0
.TP
.B \-e
Examine and verify every single data record of each table after
copying. This can take a very long time. Without \-e, only the first
and last record of each database is examined and verified.
.UNINDENT
.INDENT 0.0
.TP
.B \-?
Prints usage information
.UNINDENT
.SH AUTHOR
Bareos GmbH & Co. KG
.SH COPYRIGHT
2019 Bareos GmbH & Co. KG and others.
.\" Generated by docutils manpage writer.
.
Expand Up @@ -3,4 +3,5 @@ sbin/bareos-dbcheck
sbin/bareos-dbcopy
sbin/bscan
man/man8/bareos-dbcheck.8.gz
man/man8/bareos-dbcopy.8.gz
man/man8/bscan.8.gz
Expand Up @@ -235,6 +235,7 @@ man/man1/bregex.1.gz
man/man1/bsmtp.1.gz
man/man1/bwild.1.gz
man/man8/bareos-dbcheck.8.gz
man/man8/bareos-dbcopy.8.gz
man/man8/bareos-dir.8.gz
man/man8/bareos-fd.8.gz
man/man8/bareos-sd.8.gz
Expand Down
Expand Up @@ -235,6 +235,7 @@ man/man1/bregex.1.gz
man/man1/bsmtp.1.gz
man/man1/bwild.1.gz
man/man8/bareos-dbcheck.8.gz
man/man8/bareos-dbcopy.8.gz
man/man8/bareos-dir.8.gz
man/man8/bareos-fd.8.gz
man/man8/bareos-sd.8.gz
Expand Down
Expand Up @@ -235,6 +235,7 @@ man/man1/bregex.1.gz
man/man1/bsmtp.1.gz
man/man1/bwild.1.gz
man/man8/bareos-dbcheck.8.gz
man/man8/bareos-dbcopy.8.gz
man/man8/bareos-dir.8.gz
man/man8/bareos-fd.8.gz
man/man8/bareos-sd.8.gz
Expand Down
1 change: 1 addition & 0 deletions core/platforms/packaging/bareos-aix.spec
Expand Up @@ -190,6 +190,7 @@ for F in \
%{_mandir}/man1/bsmtp.1.gz \
%{_mandir}/man1/bwild.1.gz \
%{_mandir}/man8/bareos-dbcheck.8.gz \
%{_mandir}/man8/bareos-dbcopy.8.gz \
%{_mandir}/man8/bareos-dir.8.gz \
%{_mandir}/man8/bareos-sd.8.gz \
%{_mandir}/man8/bareos.8.gz \
Expand Down
1 change: 1 addition & 0 deletions core/platforms/packaging/bareos.spec
Expand Up @@ -923,6 +923,7 @@ for F in \
%{_mandir}/man1/bsmtp.1.gz \
%{_mandir}/man1/bwild.1.gz \
%{_mandir}/man8/bareos-dbcheck.8.gz \
%{_mandir}/man8/bareos-dbcopy.8.gz \
%{_mandir}/man8/bareos-dir.8.gz \
%{_mandir}/man8/bareos-sd.8.gz \
%{_mandir}/man8/bareos.8.gz \
Expand Down
4 changes: 3 additions & 1 deletion docs/manuals/CMakeLists.txt
@@ -1,6 +1,6 @@
# BAREOS® - Backup Archiving REcovery Open Sourced
#
# Copyright (C) 2019-2019 Bareos GmbH & Co. KG
# Copyright (C) 2019-2020 Bareos GmbH & Co. KG
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of version three of the GNU Affero General Public
Expand Down Expand Up @@ -137,6 +137,8 @@ add_custom_target(
docs ${DOCS_ALL}
COMMAND ${SPHINX_COMMAND} -M html "${SPHINX_SOURCE_DIR}" "${SPHINX_BUILDDIR}"
"${SPHINX_OPTS}"
COMMAND ${SPHINX_COMMAND} -b man "${SPHINX_SOURCE_DIR}" "${SPHINX_BUILDDIR}"
"${SPHINX_OPTS}"
DEPENDS $<$<BOOL:${docs-build-json}>:clean-docs>
DEPENDS check-git
)
2 changes: 1 addition & 1 deletion docs/manuals/source/Appendix/BareosPrograms.rst
Expand Up @@ -1254,4 +1254,4 @@ bpluginfo

The main purpose of bpluginfo is to display different information about Bareos plugin. You can use it to check a plugin name, author, license and short description. You can use -f option to display API implemented by the plugin. Some plugins may require additional ’-a’ option for val- idating a Bareos Daemons API. In most cases it is not required.


.. include:: ../man/bareos-dbcopy.rst
4 changes: 3 additions & 1 deletion docs/manuals/source/conf.py
Expand Up @@ -238,9 +238,11 @@

# -- Options for manual page output ---------------------------------------

man_bareos_dbcopy = "man/bareos-dbcopy"

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [(master_doc, "bareos", "Bareos Documentation", [author], 1)]
man_pages = [(man_bareos_dbcopy, "bareos-dbcopy", "bareos-dbcopy", [author], 8)]


# -- Options for Texinfo output -------------------------------------------
Expand Down
48 changes: 48 additions & 0 deletions docs/manuals/source/man/bareos-dbcopy.rst
@@ -0,0 +1,48 @@
bareos-dbcopy
=============

Synopsis
--------

**bareos-dbcopy** [*options*] <*sourcecatalog*> <*destinationcatalog*>

Description
-----------

:program:`bareos-dbcopy` copies the data of all tables from the Bareos catalog
``<sourcecatalog>`` into the Bareos catalog ``<destinationcatalog>``.

:program:`bareos-dbcopy` reads the Bareos director configuration from
:file:`/etc/bareos` to load the catalog settings. A configuration resource
for both ``<sourcecatalog>`` and ``<destinationcatalog>`` must exist.

The main use of :program:`bareos-dbcopy` is to migrate an existing Bareos
installation from a mysql/mariadb catalog to postgresql.

:program:`bareos-dbcopy` only copies the data over to the new catalog.
The ``<destinationcatalog>`` needs to be created and initialized with the
correct tables and columns via :program:`create_bareos_database`,
:program:`make_bareos_tables` and :program:`grant_bareos_privileges`.
Both ``sourcecatalog`` and ``destinationcatalog`` need to have the same database
scheme version, i.e. have the schema from the identical Bareos version..


Options
-------

.. program:: bareos-dbcopy

.. option:: -c <configuration directory>

bareos-dbcopy reads the director configuration from the given
<configuration directory> instead of :file:`/etc/bareos`

.. option:: -e

Examine and verify every single data record of each table after
copying. This can take a very long time. Without -e, only the first
and last record of each database is examined and verified.

.. option:: -?

Prints usage information

0 comments on commit e21afb7

Please sign in to comment.