diff --git a/core/debian/bareos-database-tools.install.in b/core/debian/bareos-database-tools.install.in index b8d1aee21c5..e04b4c24ec0 100644 --- a/core/debian/bareos-database-tools.install.in +++ b/core/debian/bareos-database-tools.install.in @@ -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* diff --git a/core/manpages/CMakeLists.txt b/core/manpages/CMakeLists.txt index 70393de7fd7..857049756b8 100644 --- a/core/manpages/CMakeLists.txt +++ b/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 @@ -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 diff --git a/core/manpages/bareos-dbcopy.8 b/core/manpages/bareos-dbcopy.8 new file mode 100644 index 00000000000..986e0b56ff6 --- /dev/null +++ b/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\fP into the Bareos catalog \fB\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\fP and \fB\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\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 +bareos\-dbcopy reads the director configuration from the given + 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. +. diff --git a/core/platforms/freebsd/bareos-freebsd/bareos.com-common/pkg-plist.database-tools b/core/platforms/freebsd/bareos-freebsd/bareos.com-common/pkg-plist.database-tools index 9dae3192783..152ca5d62c3 100644 --- a/core/platforms/freebsd/bareos-freebsd/bareos.com-common/pkg-plist.database-tools +++ b/core/platforms/freebsd/bareos-freebsd/bareos.com-common/pkg-plist.database-tools @@ -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 diff --git a/core/platforms/freebsd/bareos-freebsd/bareos.com-common/pkg-plist.devel b/core/platforms/freebsd/bareos-freebsd/bareos.com-common/pkg-plist.devel index aa67806d161..0e38d545416 100644 --- a/core/platforms/freebsd/bareos-freebsd/bareos.com-common/pkg-plist.devel +++ b/core/platforms/freebsd/bareos-freebsd/bareos.com-common/pkg-plist.devel @@ -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 diff --git a/core/platforms/freebsd/bareos-freebsd/bareos.com-common/pkg-plist.traymonitor b/core/platforms/freebsd/bareos-freebsd/bareos.com-common/pkg-plist.traymonitor index 59ab6ac7292..850ef3d33f3 100644 --- a/core/platforms/freebsd/bareos-freebsd/bareos.com-common/pkg-plist.traymonitor +++ b/core/platforms/freebsd/bareos-freebsd/bareos.com-common/pkg-plist.traymonitor @@ -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 diff --git a/core/platforms/freebsd/bareos-freebsd/bareos.com-common/plist b/core/platforms/freebsd/bareos-freebsd/bareos.com-common/plist index d404ef57d8b..51e03ae1e19 100644 --- a/core/platforms/freebsd/bareos-freebsd/bareos.com-common/plist +++ b/core/platforms/freebsd/bareos-freebsd/bareos.com-common/plist @@ -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 diff --git a/core/platforms/packaging/bareos-aix.spec b/core/platforms/packaging/bareos-aix.spec index bfb2a04aa4c..ccd01b6f458 100644 --- a/core/platforms/packaging/bareos-aix.spec +++ b/core/platforms/packaging/bareos-aix.spec @@ -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 \ diff --git a/core/platforms/packaging/bareos.spec b/core/platforms/packaging/bareos.spec index b5d78d0527a..fbb2b055f8f 100644 --- a/core/platforms/packaging/bareos.spec +++ b/core/platforms/packaging/bareos.spec @@ -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 \ diff --git a/docs/manuals/CMakeLists.txt b/docs/manuals/CMakeLists.txt index 0d4bbadd5c2..287d80b2e8d 100644 --- a/docs/manuals/CMakeLists.txt +++ b/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 @@ -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 $<$:clean-docs> DEPENDS check-git ) diff --git a/docs/manuals/source/Appendix/BareosPrograms.rst b/docs/manuals/source/Appendix/BareosPrograms.rst index b443a4852de..9acb9306d38 100644 --- a/docs/manuals/source/Appendix/BareosPrograms.rst +++ b/docs/manuals/source/Appendix/BareosPrograms.rst @@ -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 diff --git a/docs/manuals/source/conf.py b/docs/manuals/source/conf.py index d77dcdd4eeb..ffe0b06fd25 100644 --- a/docs/manuals/source/conf.py +++ b/docs/manuals/source/conf.py @@ -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 ------------------------------------------- diff --git a/docs/manuals/source/man/bareos-dbcopy.rst b/docs/manuals/source/man/bareos-dbcopy.rst new file mode 100644 index 00000000000..5bad5025a09 --- /dev/null +++ b/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 +```` into the Bareos catalog ````. + +:program:`bareos-dbcopy` reads the Bareos director configuration from +:file:`/etc/bareos` to load the catalog settings. A configuration resource +for both ```` and ```` 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 ```` 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 + + bareos-dbcopy reads the director configuration from the given + 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