From 6279b8f5a55a925e1ce1bf18448589662dc093c6 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Thu, 11 Feb 2021 11:25:15 +0100 Subject: [PATCH] docs: add manukal page for remote.cfg --- debian/control | 8 +++---- debian/proxmox-backup-server.install | 1 + docs/Makefile | 12 ++++++++-- docs/config/remote/format.rst | 17 ++++++++++++++ docs/config/remote/man5.rst | 35 ++++++++++++++++++++++++++++ docs/configuration-files.rst | 15 ++++++++++++ src/bin/docgen.rs | 5 +--- 7 files changed, 83 insertions(+), 10 deletions(-) create mode 100644 docs/config/remote/format.rst create mode 100644 docs/config/remote/man5.rst diff --git a/debian/control b/debian/control index 26c74645..c0bc61bc 100644 --- a/debian/control +++ b/debian/control @@ -36,10 +36,10 @@ Build-Depends: debhelper (>= 11), librust-percent-encoding-2+default-dev (>= 2.1-~~), librust-pin-project-1+default-dev, librust-pin-utils-0.1+default-dev, - librust-proxmox-0.10+api-macro-dev (>= 0.10.4-~~), - librust-proxmox-0.10+default-dev (>= 0.10.4-~~), - librust-proxmox-0.10+sortable-macro-dev (>= 0.10.4-~~), - librust-proxmox-0.10+websocket-dev (>= 0.10.4-~~), + librust-proxmox-0.10+api-macro-dev (>= 0.10.5-~~), + librust-proxmox-0.10+default-dev (>= 0.10.5-~~), + librust-proxmox-0.10+sortable-macro-dev (>= 0.10.5-~~), + librust-proxmox-0.10+websocket-dev (>= 0.10.5-~~), librust-proxmox-fuse-0.1+default-dev (>= 0.1.1-~~), librust-pxar-0.8+default-dev, librust-pxar-0.8+tokio-io-dev, diff --git a/debian/proxmox-backup-server.install b/debian/proxmox-backup-server.install index e0e66976..c7c842fe 100644 --- a/debian/proxmox-backup-server.install +++ b/debian/proxmox-backup-server.install @@ -22,6 +22,7 @@ usr/share/man/man1/pmtx.1 usr/share/man/man1/pmt.1 usr/share/man/man5/datastore.cfg.5 usr/share/man/man5/user.cfg.5 +usr/share/man/man5/remote.cfg.5 usr/share/zsh/vendor-completions/_proxmox-backup-manager usr/share/zsh/vendor-completions/_pmtx usr/share/zsh/vendor-completions/_pmt diff --git a/docs/Makefile b/docs/Makefile index a2a2d84b..a6fc81b7 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -10,6 +10,7 @@ GENERATED_SYNOPSIS := \ backup-protocol-api.rst \ reader-protocol-api.rst \ config/user/config.rst \ + config/remote/config.rst \ config/datastore/config.rst MAN1_PAGES := \ @@ -22,6 +23,7 @@ MAN1_PAGES := \ MAN5_PAGES := \ user.cfg.5 \ + remote.cfg.5 \ datastore.cfg.5 PRUNE_SIMULATOR_FILES := \ @@ -94,13 +96,19 @@ pmt.1: pmt/man1.rst pmt/description.rst pmt/synopsis.rst config/datastore/config.rst: ${COMPILEDIR}/docgen ${COMPILEDIR}/docgen datastore.cfg >$@ -datastore.cfg.5: config/datastore/man5.rst config/datastore/config.rst +datastore.cfg.5: config/datastore/man5.rst config/datastore/config.rst config/datastore/format.rst rst2man $< >$@ config/user/config.rst: ${COMPILEDIR}/docgen ${COMPILEDIR}/docgen user.cfg >$@ -user.cfg.5: config/user/man5.rst config/user/config.rst +user.cfg.5: config/user/man5.rst config/user/config.rst config/user/format.rst + rst2man $< >$@ + +config/remote/config.rst: ${COMPILEDIR}/docgen + ${COMPILEDIR}/docgen remote.cfg >$@ + +remote.cfg.5: config/remote/man5.rst config/remote/config.rst config/remote/format.rst rst2man $< >$@ proxmox-backup-client/synopsis.rst: ${COMPILEDIR}/proxmox-backup-client diff --git a/docs/config/remote/format.rst b/docs/config/remote/format.rst new file mode 100644 index 00000000..1881e7d5 --- /dev/null +++ b/docs/config/remote/format.rst @@ -0,0 +1,17 @@ +This file contains information used to access remote servers. + +Each entry starts with a header ``remote: ``, followed by the +remote configuration options. + +:: + + remote: server1 + host server1.local + auth-id sync@pbs + ... + + remote: ... + + +You can use the ``proxmox-backup-manager remote`` command to manipulate +this file. diff --git a/docs/config/remote/man5.rst b/docs/config/remote/man5.rst new file mode 100644 index 00000000..eea9caae --- /dev/null +++ b/docs/config/remote/man5.rst @@ -0,0 +1,35 @@ +========================== +remote.cfg +========================== + +.. include:: ../../epilog.rst + +------------------------------------------------------------- +Remote Server Configuration +------------------------------------------------------------- + +:Author: |AUTHOR| +:Version: Version |VERSION| +:Manual section: 5 + +Description +=========== + +The file /etc/proxmox-backup/remote.cfg is a configuration file for +Proxmox Backup Server. It contains information about remote servers, +usable for synchronization jobs. + + +File Format +=========== + +.. include:: format.rst + + +Options +======= + +.. include:: config.rst + + +.. include:: ../../pbs-copyright.rst diff --git a/docs/configuration-files.rst b/docs/configuration-files.rst index c0ce8c98..8a4cdf4d 100644 --- a/docs/configuration-files.rst +++ b/docs/configuration-files.rst @@ -33,3 +33,18 @@ Options ^^^^^^^ .. include:: config/user/config.rst + + +``remote.cfg`` +~~~~~~~~~~~~~~~~~ + +File Format +^^^^^^^^^^^ + +.. include:: config/remote/format.rst + + +Options +^^^^^^^ + +.. include:: config/remote/config.rst diff --git a/src/bin/docgen.rs b/src/bin/docgen.rs index 3f12fb76..90b05c76 100644 --- a/src/bin/docgen.rs +++ b/src/bin/docgen.rs @@ -1,9 +1,6 @@ use anyhow::{bail, Error}; -use proxmox::api::{ - format::*, - section_config::*, -}; +use proxmox::api::format::dump_section_config; use proxmox_backup::{ config,