diff --git a/docs/manuals/en/new_main_reference/replace.sh b/docs/manuals/en/new_main_reference/replace.sh
index c1d05c7ef5e..b885499176a 100755
--- a/docs/manuals/en/new_main_reference/replace.sh
+++ b/docs/manuals/en/new_main_reference/replace.sh
@@ -92,7 +92,18 @@ sed -i -E 's|:raw-latex:`\\sinceVersion\{(.*)\}\{(.*)\}\{(.*)\}`|\3|g' *.rst
# file
sed -i -E 's|:raw-latex:`\\file\{(.*)\}`|:file:`\1`|g' *.rst
+sed -i -E 's#^::$##g' *.rst
+#code blocks
+# {commands}{get the process ID of a running Bareos daemon}
+# ps fax | grep bareos-dir
+# 2103 ? S 0:00 /usr/sbin/bareos-dir
+
+#.. code-block:: c
+# :caption: get the process ID of a running Bareos daemon
+
+
+sed -i -E 's#\{commands\}\{(.*)\}#\n.. code-block:: sh\n :caption: \1\n#g' *.rst
#
diff --git a/docs/manuals/en/new_main_reference/source/always-incremental.rst b/docs/manuals/en/new_main_reference/source/always-incremental.rst
index 1b90b37c88c..7baa6495573 100644
--- a/docs/manuals/en/new_main_reference/source/always-incremental.rst
+++ b/docs/manuals/en/new_main_reference/source/always-incremental.rst
@@ -116,7 +116,7 @@ Always Incremental Backup Job
To configure a job to use Always Incremental Backup Scheme, following
configuration is required:
-::
+
{bareosConfigResource}{bareos-dir}{job}{example}
Job {
@@ -151,7 +151,7 @@ configuration is required:
Consolidate Job
~~~~~~~~~~~~~~~
-::
+
{bareosConfigResource}{bareos-dir}{job}{Consolidate}
Job {
@@ -199,7 +199,7 @@ For the Always Incremental Backup Scheme at least two storages are
needed. See :ref:`section-MultipleStorageDevices` how to
setup multiple storages.
-::
+
{bareosConfigResource}{bareos-dir}{pool}{AI-Incremental}
Pool {
@@ -215,7 +215,7 @@ setup multiple storages.
Next Pool = AI-Consolidated # consolidated jobs go to this pool
}
-::
+
{bareosConfigResource}{bareos-dir}{pool}{AI-Consolidated}
Pool {
@@ -231,7 +231,7 @@ setup multiple storages.
Next Pool = AI-Longterm # copy jobs write to this pool
}
-::
+
{bareosConfigResource}{bareos-dir}{pool}{AI-Longterm}
Pool {
@@ -257,7 +257,7 @@ configured for always incremental Backup. The Backup itself is scheduled
every night to run as incremental backup, while the consolidation is
scheduled to run every day.
-::
+
{bareosConfigResource}{bareos-dir}{job}{BackupClient1}
Job {
@@ -274,7 +274,7 @@ scheduled to run every day.
Full Backup Pool = AI-Consolidated
}
-::
+
{bareosConfigResource}{bareos-dir}{job}{Consolidate}
Job {
@@ -447,7 +447,7 @@ was introduced.
needs to be configured in the
:raw-latex:`\resourceDirectiveValue{Dir}{Job}{Type}{Consolidate}` job:
-::
+
{bareosConfigResource}{bareos-dir}{job}{Consolidate}
Job {
@@ -520,7 +520,7 @@ As all full backups go into the :raw-latex:`\pool{AI-Consolidated}`, we
just copy all uncopied backups in the
:raw-latex:`\pool{AI-Consolidated}` to a longterm pool:
-::
+
{bareosConfigResource}{bareos-dir}{job}{CopyLongtermFull}
Job {
@@ -547,7 +547,7 @@ Virtual Full Jobs
The alternative to Copy Jobs is creating a virtual Full Backup Job when
the data should be stored in a long-term pool.
-::
+
{bareosConfigResource}{bareos-dir}{job}{VirtualLongtermFull}
Job {
@@ -624,7 +624,7 @@ incremental backup of the remote client.
Run the first backup but make sure that you choose the remote storage to
be used.
-::
+
{bconsole}{run}
*run job=BackupClient-remote level=Full storage=File-remote
@@ -643,7 +643,7 @@ daemon.
List volumes shows that the volumes used still belong to the remote
storage:
-::
+
{bconsole}{list volumes}
*list volumes
@@ -658,7 +658,7 @@ storage:
Use :raw-latex:`\bcommand{update}{volume}` to set the right storage and
check with list volumes that it worked:
-::
+
{bconsole}{update volume}
*update volume=Full-0001 storage=File
diff --git a/docs/manuals/en/new_main_reference/source/autochangers.rst b/docs/manuals/en/new_main_reference/source/autochangers.rst
index cb812e495c8..ab9d877628e 100644
--- a/docs/manuals/en/new_main_reference/source/autochangers.rst
+++ b/docs/manuals/en/new_main_reference/source/autochangers.rst
@@ -111,7 +111,7 @@ Under Linux, you can
\footnotesize
-::
+
cat /proc/scsi/scsi
@@ -125,7 +125,7 @@ to see what SCSI devices you have available. You can also:
\footnotesize
-::
+
cat /proc/scsi/sg/device_hdr /proc/scsi/sg/devices
@@ -141,7 +141,7 @@ Bareos directive.
You can also use the excellent **lsscsi** tool.
:raw-latex:`\footnotesize`
-::
+
$ lsscsi -g
[1:0:2:0] tape SEAGATE ULTRIUM06242-XXX 1619 /dev/st0 /dev/sg9
@@ -166,7 +166,7 @@ directive:
\footnotesize
-::
+
camcontrol devlist
@@ -183,7 +183,7 @@ Bareos will NOT have permission to control the device
To get around this just edit the :file:`/etc/devfs.conf`
file and add the following to the bottom: :raw-latex:`\footnotesize`
-::
+
own pass0 root:bareos
perm pass0 0666
@@ -198,9 +198,12 @@ This gives the bareos group permission to write to the nsa0.0 device too
just to be on the safe side. To bring these changes into effect just
run:-
-::
- {commands}{}
+
+
+.. code-block:: sh
+ :caption:
+
/etc/rc.d/devfs restart
Basically this will stop you having to manually change permissions on
@@ -244,7 +247,7 @@ tape in the drive.
You can check if the Slot number and InChanger flag by:
-::
+
{bconsole}{list volumes}
*list volumes
@@ -357,7 +360,7 @@ treated as a cleaning tape, and will not be labeled. For example with:
\footnotesize
-::
+
Pool {
Name ...
@@ -384,7 +387,7 @@ program, you must first tell Bareos to release the autochanger by doing:
\footnotesize
-::
+
unmount
(change cartridges and/or run mtx)
@@ -421,7 +424,7 @@ commands in the Console program:
\footnotesize
-::
+
unmount
(remove magazine)
@@ -538,7 +541,7 @@ scan all Volumes, so the **update slots** command (as well as the
\footnotesize
-::
+
update slots=n1,n2,n3-n4, ...
@@ -560,7 +563,7 @@ For example, the command:
\footnotesize
-::
+
update slots=1,6 scan
@@ -576,7 +579,7 @@ The command:
\footnotesize
-::
+
update slots=1-3,6
@@ -613,7 +616,7 @@ then with the Console program, enter the **label** command:
\footnotesize
-::
+
./bconsole
Connecting to Director rufus:8101
@@ -630,7 +633,7 @@ it will then print something like:
\footnotesize
-::
+
Using default Catalog name=BackupDB DB=bareos
The defined Storage resources are:
@@ -648,7 +651,7 @@ I select the autochanger (1), and it prints:
\footnotesize
-::
+
Enter new Volume name: TestVolume1
Enter slot (0 for none): 1
@@ -664,7 +667,7 @@ the slot. It then asks:
\footnotesize
-::
+
Defined Pools:
1: Default
@@ -684,7 +687,7 @@ was in the drive, so it printed:
\footnotesize
-::
+
Connecting to Storage daemon Autochanger at localhost:9103 ...
Sending label command ...
@@ -715,7 +718,7 @@ like the following:
\footnotesize
-::
+
*{\bf list volumes}
Using default Catalog name=BackupDB DB=bareos
@@ -781,7 +784,7 @@ The **status slots storage=xxx** command displays autochanger content.
\footnotesize
-::
+
Slot | Volume Name | Status | Type | Pool | Loaded |
------+-----------------+----------+-------------------+----------------+---------|
@@ -819,7 +822,7 @@ information in the precise format as specified below:
\footnotesize
-::
+
- Currently the changer commands used are:
loaded -- returns number of the slot that is loaded, base 1,
@@ -890,7 +893,7 @@ block size that is configured in the
parameter in the device. Per default, this value is 63k, so usually a
tape written by Bareos looks like this:
-::
+
|-------------------
|label block (63k)|
@@ -904,7 +907,7 @@ tape written by Bareos looks like this:
Setting the maximum block size to e.g. 512k, would lead to the
following:
-::
+
|-------------------
|label block (512k)|
@@ -951,7 +954,7 @@ following way:
The following picture shows the result:
-::
+
|--------------------------------|
|label block (label block size) |
@@ -977,7 +980,7 @@ This approach has the following advantages:
:raw-latex:`\linkResourceDirective{Dir}{Pool}{Maximum Block Size}` is
set to the new value that you wish to use in the future:
-::
+
{bconfig}{Pool Ressource: setting Maximum Block Size}
Pool {
@@ -1027,7 +1030,7 @@ At least on Linux, you can see if Bareos tries to read the blocks with
the wrong block size. In that case, you get a kernel message like the
following in your system’s messages:
-::
+
[542132.410170] st1: Failed to read 1048576 byte block with 64512 byte transfer.
@@ -1068,9 +1071,12 @@ with another blocksize than the
:raw-latex:`\variable{DEFAULT_BLOCK_SIZE}` (63k), but with the default
label block size of 63k:
-::
- {commands}{bls with non-default block size}
+
+
+.. code-block:: sh
+ :caption: bls with non-default block size
+
blsFC-Drive-1 -V A00007L4
bls: butil.c:289-0 Using device: "FC-Drive-1" for reading.
25-Feb 12:47 bls JobId 0: No slot defined in catalog (slot=0) for Volume "A00007L4" on "FC-Drive-1" (/dev/tape/by-id/scsi-350011d00018a5f03-nst).
@@ -1085,9 +1091,12 @@ As can be seen, :program:`bls` manages to read the label
block as it knows what volume is mounted (Ready to read from volume
:raw-latex:`\parameter{A00007L4}`), but fails to read the data blocks.
-::
- {commands}{dmesg}
+
+
+.. code-block:: sh
+ :caption: dmesg
+
dmesg
[...]
st2: Failed to read 131072 byte block with 64512 byte transfer.
@@ -1100,7 +1109,7 @@ Now we have to set this block size in the
:file:`bareos-sd.conf`, device resource as
:raw-latex:`\linkResourceDirective{Sd}{Device}{Maximum Block Size}`:
-::
+
{bconfig}{Storage Device Resource: setting Maximum Block Size}
Device {
@@ -1118,9 +1127,12 @@ Now we have to set this block size in the
Now we can call bls again, and everything works as expected:
-::
- {commands}{bls with non-default block size}
+
+
+.. code-block:: sh
+ :caption: bls with non-default block size
+
blsFC-Drive-1 -V A00007L4
bls: butil.c:289-0 Using device: "FC-Drive-1" for reading.
25-Feb 12:49 bls JobId 0: No slot defined in catalog (slot=0) for Volume "A00007L4" on "FC-Drive-1" (/dev/tape/by-id/scsi-350011d00018a5f03-nst).
@@ -1156,7 +1168,7 @@ the drives, it’s probably best to set up an admin job that removes the
tapes from the drives. This job has to run, when no other backups do
run. A job definition for an admin job to do that may look like this:
-::
+
{bareosConfigResource}{bareos-dir}{job}{ReleaseAllTapeDrives}
Job {
diff --git a/docs/manuals/en/new_main_reference/source/basejob.rst b/docs/manuals/en/new_main_reference/source/basejob.rst
index e168582ec79..6e7a12872b1 100644
--- a/docs/manuals/en/new_main_reference/source/basejob.rst
+++ b/docs/manuals/en/new_main_reference/source/basejob.rst
@@ -28,7 +28,7 @@ A new Job directive :raw-latex:`\configdirective{Base=JobX,JobY,...}`
permits to specify the list of files that will be used during Full
backup as base.
-::
+
Job {
Name = BackupLinux
@@ -55,7 +55,7 @@ behavior with the ``BaseJob`` FileSet option. This option works like the
:raw-latex:`\configdirective{Verify}`, that is described in the
:ref:`FileSet ` chapter.
-::
+
FileSet {
Name = Full
diff --git a/docs/manuals/en/new_main_reference/source/bconsole.rst b/docs/manuals/en/new_main_reference/source/bconsole.rst
index 6fc57c036d9..300d4946e2a 100644
--- a/docs/manuals/en/new_main_reference/source/bconsole.rst
+++ b/docs/manuals/en/new_main_reference/source/bconsole.rst
@@ -61,7 +61,7 @@ The console program can be run with the following options:
single: Command Line Options
-::
+
{commandOut}{bconsole command line options}{}{bconsole -?}
Usage: bconsole [-s] [-c config_file] [-d debug_level]
@@ -86,7 +86,7 @@ enter the command followed by arguments. The general format is:
\footnotesize
-::
+
[=] [=] ...
@@ -109,7 +109,7 @@ For example:
\footnotesize
-::
+
list files jobid=23
@@ -123,7 +123,7 @@ will list all files saved for JobId 23. Or:
\footnotesize
-::
+
show pools
@@ -178,7 +178,7 @@ following commands:
\footnotesize
-::
+
bconsole -c ./bconsole.conf <su - postgres -c /usr/lib/bareos/scripts/grant_bareos_privileges
For details see chapter
@@ -202,9 +205,12 @@ section about howto achieve this for the different database systems.
To view and test the currently configured settings, use following
commands:
-::
- {commands}{Show current database configuration}
+
+
+.. code-block:: sh
+ :caption: Show current database configuration
+
/usr/sbin/bareos-dbcheck -B
catalog=MyCatalog
db_name=bareos
@@ -217,9 +223,12 @@ commands:
db_type=MySQL
working_dir=/var/lib/bareos
-::
- {commands}{Test the database connection. Example: wrong password}
+
+
+.. code-block:: sh
+ :caption: Test the database connection. Example: wrong password
+
/usr/sbin/bareos-dir -t -f -d 500
[...]
bareos-dir: mysql.c:204-0 Error 1045 (28000): Access denied for user 'bareos'@'localhost' (using password: YES)
@@ -242,9 +251,12 @@ the user.
If this works on your system can be verified by
-::
- {commands}{Access the local PostgreSQL database}
+
+
+.. code-block:: sh
+ :caption: Access the local PostgreSQL database
+
su - postgres
psql
@@ -254,7 +266,7 @@ definied in the file
in the following syntax:
:raw-latex:`\parameter{HOST:PORT:DATABASE:USER:PASSWORD}`, e.g.
-::
+
{config}{PostgreSQL access credentials}
localhost:*:bareos:bareos:secret
@@ -267,9 +279,12 @@ the :program:`psql` command. If this connects you to the
database, your credentials are good. Exit the PostgreSQL client and run
the Bareos database preparation scripts:
-::
- {commands}{Setup Bareos catalog database}
+
+
+.. code-block:: sh
+ :caption: Setup Bareos catalog database
+
su - postgres
/usr/lib/bareos/scripts/create_bareos_database
/usr/lib/bareos/scripts/make_bareos_tables
@@ -282,9 +297,12 @@ database with this encoding. This can be verified by the command
:program:`psql -l`, which shows information about existing
databases:
-::
- {commands}{List existing databases}
+
+
+.. code-block:: sh
+ :caption: List existing databases
+
psql -l
List of databases
Name | Owner | Encoding
@@ -307,9 +325,12 @@ By default, using PostgreSQL ident, a Unix user can access a database of
the same name. Therefore the user :raw-latex:`\user{bareos}` can access
the database ``path:bareos``.
-::
- {commands}{Verify Bareos database on PostgreSQL as Unix user bareos (bareos-13.2.3)}
+
+
+.. code-block:: sh
+ :caption: Verify Bareos database on PostgreSQL as Unix user bareos (bareos-13.2.3)
+
root@linux:~# su - bareos -s /bin/sh
bareos@linux:~# psql
Welcome to psql 8.3.23, the PostgreSQL interactive terminal.
@@ -389,9 +410,12 @@ When configuring bareos with a remote database, your first step is to
check the connection from the |bareosDir| host into the
database. A functional connection can be verified by
-::
- {commands}{Access the remote PostgreSQL database}
+
+
+.. code-block:: sh
+ :caption: Access the remote PostgreSQL database
+
su - postgres
psql --host bareos-database.example.com
@@ -423,9 +447,12 @@ Set the PostgreSQL server IP as
other parameters or use the defaults. A quick check should display your
recent changes:
-::
- {commands}{Show current database configuration}
+
+
+.. code-block:: sh
+ :caption: Show current database configuration
+
/usr/sbin/bareos-dbcheck -B
catalog=MyCatalog
db_name=bareos
@@ -441,9 +468,12 @@ recent changes:
If **dbconfig-common** did not succeed or you choosed
not to use it, run the Bareos database preparation scripts with:
-::
- {commands}{Setup Bareos catalog database}
+
+
+.. code-block:: sh
+ :caption: Setup Bareos catalog database
+
su - postgres
/usr/lib/bareos/scripts/create_bareos_database --host=bareos-database.example.com
/usr/lib/bareos/scripts/make_bareos_tables --host=bareos-database.example.com
@@ -467,7 +497,7 @@ the database. To guarantee this, create a MySQL credentials file
`\file{~/.my.cnf} `_
with the credentials of the database administrator:
-::
+
{config}{MySQL credentials file .my.cnf}
[client]
@@ -488,7 +518,7 @@ connect without password. This is not recommended. Choose a database
password and add it into the Bareos Director configuration file
:raw-latex:`\configFileDirUnix`:
-::
+
{bconfig}{Bareos catalog configuration}
...
@@ -511,9 +541,12 @@ environment variable :raw-latex:`\variable{db_password}`. From
the database password is read from the configuration, if no environment
variable is given.
-::
- {commands}{Setup Bareos catalog database}
+
+
+.. code-block:: sh
+ :caption: Setup Bareos catalog database
+
export db_password=YourSecretPassword
/usr/lib/bareos/scripts/create_bareos_database
/usr/lib/bareos/scripts/make_bareos_tables
@@ -524,9 +557,12 @@ verify that your database setup is okay and works with your the Bareos
database user. The result should look similar as this (here Bareos 13.2
is used on SLES11):
-::
- {commands}{Verify Bareos database on MySQL}
+
+
+.. code-block:: sh
+ :caption: Verify Bareos database on MySQL
+
root@linux:~# mysql --user=bareos --password=YourSecretPassword bareos
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 162
@@ -638,7 +674,7 @@ If you want to change the Bareos database credentials, do the following:
Modify the configuration, set a new password:
-::
+
{bareosConfigResource}{bareos-dir}{Catalog}{MyCatalog}
Catalog {
@@ -652,9 +688,12 @@ Modify the configuration, set a new password:
Rerun the Bareos grant script
:program:`grant_bareos_privileges` ...
-::
- {commands}{Modify database privileges}
+
+
+.. code-block:: sh
+ :caption: Modify database privileges
+
export db_password=MyNewSecretPassword
/usr/lib/bareos/scripts/grant_bareos_privileges
@@ -666,7 +705,10 @@ Rerun the Bareos grant script
% we skip this topic here.
... or modify the database users directly:
- \begin{verbatim}{commands}{Show Bareos database users}
+ \begin{verbatim}
+.. code-block:: sh
+ :caption: Show Bareos database users
+
mysql
mysql> SELECT user,host,password FROM mysql.user WHERE user='bareos';
+--------+-----------+-------------------------------------------+
@@ -717,9 +759,12 @@ apply are the Unix file permissions.
The database is accessable by following command:
-::
- {commands}{Verify Bareos database on Sqlite3 (bareos-13.2.3)}
+
+
+.. code-block:: sh
+ :caption: Verify Bareos database on Sqlite3 (bareos-13.2.3)
+
sqlite3 /var/lib/bareos/bareos.db
SQLite version 3.7.6.3
Enter ".help" for instructions
@@ -768,7 +813,7 @@ calculated as:
\footnotesize
-::
+
Size = 154 * No. Systems * (100,000 * 4 + 10,000 * 26)
@@ -783,7 +828,7 @@ per month. This would give the following:
\footnotesize
-::
+
Size = 154 * 2 * (100,000 * 4 + 10,000 * 26) = 203,280,000 bytes
@@ -961,7 +1006,7 @@ prune (remove) Job records that are older than the specified period.
You can use the following Job resource in your nightly
:raw-latex:`\job{BackupCatalog}` job to maintain statistics.
-::
+
{bareosConfigResource}{bareos-dir}{Job}{BackupCatalog}
Job {
@@ -1028,9 +1073,12 @@ For a PostgreSQL database, you could write the Bareos database as an
ASCII file (:file:`bareos.sql`) then reload it by doing the
following:
-::
- {commands}{}
+
+
+.. code-block:: sh
+ :caption:
+
pg_dump -c bareos > bareos.sql
cat bareos.sql | psql bareos
rm -f bareos.sql
@@ -1072,9 +1120,12 @@ default setting of ``autovacuum_vacuum_scale_factor = 0.2``, the current
value can be shown with the following query or looked up in
``postgresql.conf``:
-::
- {commands}{SQL statement to show the autovacuum\_vacuum\_scale\_factor parameter}
+
+
+.. code-block:: sh
+ :caption: SQL statement to show the autovacuum\_vacuum\_scale\_factor parameter
+
bareos=# show autovacuum_vacuum_scale_factor;
autovacuum_vacuum_scale_factor
--------------------------------
@@ -1099,9 +1150,12 @@ by scheduling it to run after the BackupCatalog job.
First step is to check the amount of dead tuples and if autovacuum
triggers VACUUM:
-::
- {commands}{Check dead tuples and vacuuming on PostgreSQL}
+
+
+.. code-block:: sh
+ :caption: Check dead tuples and vacuuming on PostgreSQL
+
bareos=# SELECT relname, n_dead_tup, last_vacuum, last_autovacuum, last_analyze, last_autoanalyze
FROM pg_stat_user_tables WHERE n_dead_tup > 0 ORDER BY n_dead_tup DESC;
-[ RECORD 1 ]----+------------------------------
@@ -1143,7 +1197,10 @@ following must be done:
::
- {commands}{SQL Script for vacuuming the file table on PostgreSQL}
+
+.. code-block:: sh
+ :caption: SQL Script for vacuuming the file table on PostgreSQL
+
\t \x
SELECT relname, n_dead_tup, last_vacuum, last_autovacuum, last_analyze, last_autoanalyze
FROM pg_stat_user_tables WHERE relname='file';
@@ -1168,7 +1225,10 @@ following must be done:
::
- {commands}{SQL Script for vacuuming the file table on PostgreSQL}
+
+.. code-block:: sh
+ :caption: SQL Script for vacuuming the file table on PostgreSQL
+
#!/bin/sh
psql bareos < /usr/local/lib/bareos/scripts/postgresql_file_table_maintenance.sql
@@ -1180,7 +1240,10 @@ following must be done:
::
- {commands}{sudo rule for allowing bareos to run a script as postgres}
+
+.. code-block:: sh
+ :caption: sudo rule for allowing bareos to run a script as postgres
+
bareos ALL = (postgres) NOPASSWD: /usr/local/lib/bareos/scripts/postgresql_file_table_maintenance.sh
and make sure that ``/etc/sudoers`` includes it, usually by the line
@@ -1198,7 +1261,10 @@ following must be done:
::
- {commands}{SQL Script for vacuuming the file table on PostgreSQL}
+
+.. code-block:: sh
+ :caption: SQL Script for vacuuming the file table on PostgreSQL
+
# PostgreSQL file table maintenance job
Job {
Name = FileTableMaintJob
@@ -1297,7 +1363,7 @@ up to date and to recycle space inside the database files.
You can do this via the **mysqlcheck** command:
:raw-latex:`\footnotesize`
-::
+
mysqlcheck -a -o -A
@@ -1348,7 +1414,7 @@ consider running MySQL’s database check and repair routines.
This can be done by running the :program:`mysqlcheck`
command: :raw-latex:`\footnotesize`
-::
+
mysqlcheck --all-databases
@@ -1389,7 +1455,7 @@ You can display the maximum length of your table with:
\footnotesize
-::
+
mysql bareos
SHOW TABLE STATUS FROM bareos like "File";
@@ -1405,7 +1471,7 @@ be the source of your problem, and you can modify it with:
\footnotesize
-::
+
mysql bareos
ALTER TABLE File MAX_ROWS=281474976710656;
@@ -1446,7 +1512,7 @@ strange errors. E.g.
\footnotesize
-::
+
Fatal error: spool.c:402 Spool data read error.
Fatal error: backup.c:892 Network send error to SD. ERR=Connection reset by
@@ -1463,7 +1529,7 @@ directory, which can be set in the /etc/my.cnf with these variables set:
\footnotesize
-::
+
tmpdir=/path/to/larger/tmpdir
bdb_tmpdir=/path/to/larger/tmpdir
@@ -1478,7 +1544,7 @@ MySQL: Lock Wait Timeout
In large environments, the Bareos :raw-latex:`\mysql `backend may run in
a lock wait timeout. This can be seen as Bareos message, e.g.:
-::
+
{Bareos error message because of \mysql lock time timeout}
Fatal error: sql_create.c:899 Fill File table Query failed: INSERT INTO File (FileIndex, JobId, PathId, FilenameId, LStat, MD5, DeltaSeq) SELECT batch.FileIndex, batch.JobId, Path.PathId, Filename.FilenameId,batch.LStat, batch.MD5, batch.DeltaSeq FROM batch JOIN Path ON (batch.Path = Path.Path) JOIN Filename ON (batch.Name = Filename.Name): ERR=Lock wait timeout exceeded; try restarting transaction
@@ -1487,7 +1553,7 @@ In this case the
:raw-latex:`\mysql `:raw-latex:`\configline{innodb_lock_wait_timeout}`
must be increased. A value of 300 should be sufficient.
-::
+
{config}{/etc/my.cnf.d/server.cnf}
...
@@ -1718,7 +1784,7 @@ Assuming that you start all your nightly backup jobs at 1:05 am (and
that they run one after another), you can do the catalog backup with the
following additional Director configuration statements:
-::
+
{bareosConfigResource}{bareos-dir}{Job}{BackupCatalog}
# Backup the catalog database (after the nightly save)
@@ -1742,7 +1808,7 @@ following additional Director configuration statements:
Write Bootstrap = "|/usr/sbin/bsmtp -h localhost -f \"\(Bareos\) \" -s \"Bootstrap for Job %j\" root@localhost"
}
-::
+
{bareosConfigResource}{bareos-dir}{Schedule}{WeeklyCycleAfterBackup}
# This schedule does the catalog. It starts after the WeeklyCycle
@@ -1751,7 +1817,7 @@ following additional Director configuration statements:
Run = Level=Full sun-sat at 1:10
}
-::
+
{bareosConfigResource}{bareos-dir}{FileSet}{Catalog}
# This is the backup of the catalog
diff --git a/docs/manuals/en/new_main_reference/source/client-initiated-connection.rst b/docs/manuals/en/new_main_reference/source/client-initiated-connection.rst
index 89757b1b42a..cebdaf2560c 100644
--- a/docs/manuals/en/new_main_reference/source/client-initiated-connection.rst
+++ b/docs/manuals/en/new_main_reference/source/client-initiated-connection.rst
@@ -64,7 +64,7 @@ Connections, the |bareosFd| connects to the
connections open. The command :raw-latex:`\bcommand{status}{dir}` will
show all waiting connections:
-::
+
{bconsole}{show waiting client connections}
*status dir
@@ -105,7 +105,7 @@ adding the line
to the default message resource
:raw-latex:`\resourcename{Fd}{Messages}{Standard}`:
-::
+
{bareosConfigResource}{bareos-fd}{messages}{Standard}
Messages {
diff --git a/docs/manuals/en/new_main_reference/source/configure.rst b/docs/manuals/en/new_main_reference/source/configure.rst
index 8b4b78bedeb..fb33215f092 100644
--- a/docs/manuals/en/new_main_reference/source/configure.rst
+++ b/docs/manuals/en/new_main_reference/source/configure.rst
@@ -347,7 +347,10 @@ Updates from Bareos :math:`<` 16.2.4
::
- {commands}{\bareosMigrateConfigSh}
+
+.. code-block:: sh
+ :caption: \bareosMigrateConfigSh
+
# prepare temporary directory
mkdir /tmp/baroes-dir.d
cd /tmp/baroes-dir.d
@@ -381,7 +384,10 @@ Updates from Bareos :math:`<` 16.2.4
- ::
- {commands}{move configuration to subdirectory}
+
+.. code-block:: sh
+ :caption: move configuration to subdirectory
+
mkdir CONFIGDIR/COMPONENT.d/migrate && mv CONFIGDIR/COMPONENT.conf CONFIGDIR/COMPONENT.d/migrate
@@ -480,7 +486,7 @@ can do so by including other files using the syntax
file. The :raw-latex:`\configdirective{@filename}` specification can be
given anywhere a primitive token would appear.
-::
+
{bconfig}{include a configuration file}
@/etc/bareos/extra/clients.conf
@@ -489,7 +495,7 @@ Since Bareos
16.2.1
wildcards in pathes are supported:
-::
+
{bconfig}{include multiple configuration files}
@/etc/bareos/extra/*.conf
@@ -497,14 +503,14 @@ wildcards in pathes are supported:
By using :raw-latex:`\configdirective{@|command}` it is also possible to
include the output of a script as a configuration:
-::
+
{bconfig}{use the output of a script as configuration}
@|"/etc/bareos/generate_configuration_to_stdout.sh"
or if a parameter should be used:
-::
+
{bconfig}{use the output of a script with parameter as a configuration}
@|"sh -c '/etc/bareos/generate_client_configuration_to_stdout.sh clientname=client1.example.com'"
@@ -547,7 +553,7 @@ identify the resource. The :raw-latex:`\configdirective{Description}`
directive can be used during the display of the Resource to provide
easier human recognition. For example:
-::
+
{bconfig}{Resource example}
Director {
diff --git a/docs/manuals/en/new_main_reference/source/consoleconf.rst b/docs/manuals/en/new_main_reference/source/consoleconf.rst
index f2e9f260520..8c91369aecf 100644
--- a/docs/manuals/en/new_main_reference/source/consoleconf.rst
+++ b/docs/manuals/en/new_main_reference/source/consoleconf.rst
@@ -45,7 +45,7 @@ An actual example might be:
\footnotesize
-::
+
Director {
Name = HeadMan
@@ -183,7 +183,7 @@ Example Console Configuration File
A Console configuration file might look like this:
-::
+
{bconfig}{bconsole configuration}
Director {
@@ -209,7 +209,7 @@ The following configuration files were supplied by Phil Stracchino.
To use named consoles from :program:`bconsole`, use a
:file:`bconsole.conf` configuration file like this:
-::
+
{bconfig}{bconsole: restricted-user}
Director {
@@ -228,7 +228,7 @@ the Console resource is given a name, in this case
:raw-latex:`\argument{restricted-user}`. Then in the Director
configuration (not directly accessible by the user), we define:
-::
+
{bareosConfigResource}{bareos-dir}{console}{restricted-user}
Console {
@@ -263,7 +263,7 @@ The following is an example of a :file:`bconsole.conf` file
that can access several Directors and has different Consoles depending
on the Director:
-::
+
{bconfig}{bconsole: multiple consoles}
Director {
@@ -294,7 +294,7 @@ The second Director referenced at
:raw-latex:`\resourcename{Dir}{Director}{secondserver}` might look like
the following:
-::
+
{bareosConfigResource}{bareos-dir}{console}{restricted-user2}
Console {
diff --git a/docs/manuals/en/new_main_reference/source/dataencryption.rst b/docs/manuals/en/new_main_reference/source/dataencryption.rst
index ca422bf58ef..4145ac5c7da 100644
--- a/docs/manuals/en/new_main_reference/source/dataencryption.rst
+++ b/docs/manuals/en/new_main_reference/source/dataencryption.rst
@@ -81,7 +81,7 @@ written to Volume supports arbitrary symmetric, asymmetric, and digest
algorithms for future extensibility, and the back-end implementation
currently supports:
-::
+
Symmetric Encryption:
- 128, 192, and 256-bit AES-CBC
@@ -116,7 +116,7 @@ Generate a Master Key Pair with:
\footnotesize
-::
+
openssl genrsa -out master.key 2048
openssl req -new -key master.key -x509 -out master.cert
@@ -131,7 +131,7 @@ Generate a File Daemon Key Pair for each FD:
\footnotesize
-::
+
openssl genrsa -out fd-example.key 2048
openssl req -new -key fd-example.key -x509 -out fd-example.cert
diff --git a/docs/manuals/en/new_main_reference/source/debug.rst b/docs/manuals/en/new_main_reference/source/debug.rst
index 221c585ea8a..4be59a6bd2a 100644
--- a/docs/manuals/en/new_main_reference/source/debug.rst
+++ b/docs/manuals/en/new_main_reference/source/debug.rst
@@ -64,7 +64,10 @@ correctly on your system:
::
- {commands}{disable ptrace protection to enable debugging (required on Ubuntu Linux)}
+
+.. code-block:: sh
+ :caption: disable ptrace protection to enable debugging (required on Ubuntu Linux)
+
test -e /proc/sys/kernel/yama/ptrace_scope && echo 0 > /proc/sys/kernel/yama/ptrace_scope
If all the above conditions are met, the daemon that crashes will
@@ -83,9 +86,12 @@ then obtain the **PID** of the main daemon thread (there are multiple
threads). The output produced here will look different depending on what
OS and what version of the kernel you are running.
-::
- {commands}{get the process ID of a running Bareos daemon}
+
+
+.. code-block:: sh
+ :caption: get the process ID of a running Bareos daemon
+
ps fax | grep bareos-dir
2103 ? S 0:00 /usr/sbin/bareos-dir
@@ -93,9 +99,12 @@ which in this case is 2103. Then while Bareos is running, you call the
program giving it the path to the Bareos executable and the **PID**. In
this case, it is:
-::
- {commands}{get traceback of running Bareos director daemon}
+
+
+.. code-block:: sh
+ :caption: get traceback of running Bareos director daemon
+
btraceback /usr/sbin/bareos-dir 2103
It should produce an email showing you the current state of the daemon
@@ -132,7 +141,10 @@ daemons, only the name changes), you would do the following:
::
- {commands}{run the Bareos Storage daemon in the debugger}
+
+.. code-block:: sh
+ :caption: run the Bareos Storage daemon in the debugger
+
gdb --args /usr/sbin/bareos-sd -f -s -d 200
(gdb) run
@@ -164,7 +176,10 @@ daemons, only the name changes), you would do the following:
::
- {commands}{run the Bareos Storage daemon in the debugger}
+
+.. code-block:: sh
+ :caption: run the Bareos Storage daemon in the debugger
+
(gdb) thread apply all bt
After that you can issue any debugging command.
diff --git a/docs/manuals/en/new_main_reference/source/dirdconf.rst b/docs/manuals/en/new_main_reference/source/dirdconf.rst
index dafba3c7d41..c04b0960476 100644
--- a/docs/manuals/en/new_main_reference/source/dirdconf.rst
+++ b/docs/manuals/en/new_main_reference/source/dirdconf.rst
@@ -100,7 +100,7 @@ the network. Only a single Director resource is allowed.
The following is an example of a valid Director resource definition:
-::
+
{bconfig}{Director Resource example}
Director {
@@ -158,7 +158,7 @@ the FileSets may be the same).
The following is an example of a valid Job resource definition:
-::
+
{bconfig}{Job Resource Example}
Job {
@@ -230,7 +230,7 @@ An example schedule resource that is named **WeeklyCycle** and runs a
job with level full each Sunday at 2:05am and an incremental job Monday
through Saturday at 2:05am is:
-::
+
{bconfig}{Schedule Example}
Schedule {
@@ -241,7 +241,7 @@ through Saturday at 2:05am is:
An example of a possible monthly cycle is as follows:
-::
+
{bconfig}{}
Schedule {
@@ -253,7 +253,7 @@ An example of a possible monthly cycle is as follows:
The first of every month:
-::
+
{bconfig}{}
Schedule {
@@ -265,7 +265,7 @@ The first of every month:
The last friday of the month (i.e. the last friday in the last week of
the month)
-::
+
{bconfig}{}
Schedule {
@@ -275,7 +275,7 @@ the month)
Every 10 minutes:
-::
+
{bconfig}{}
Schedule {
@@ -297,7 +297,7 @@ part determines on which day/week the job should be run first. E.g. if
you want to run a backup in a 5-week-cycle, starting on week 3, you set
it up as w03/w05.
-::
+
{bconfig}{Schedule Examples: modulo}
Schedule {
@@ -398,7 +398,7 @@ machine to be backed up.
The following is an example of a valid Client resource definition:
-::
+
{bconfig}{Minimal client resource definition in bareos-dir.conf}
Client {
@@ -409,7 +409,7 @@ The following is an example of a valid Client resource definition:
The following is an example of a Quota Configuration in Client resource:
-::
+
{bconfig}{Quota Configuration in Client resource}
Client {
@@ -442,7 +442,7 @@ by the Director.
The following is an example of a valid Storage resource definition:
-::
+
{bconfig}{Storage resource (tape) example}
Storage {
@@ -541,7 +541,7 @@ the following directives:
The following is an example of a valid Pool resource definition:
-::
+
{bconfig}{Pool resource example}
Pool {
@@ -596,7 +596,7 @@ on a different machine on the network. See below for more details.
The following is an example of a valid Catalog resource definition:
-::
+
{bconfig}{Catalog Resource for Sqlite}
Catalog
@@ -610,7 +610,7 @@ The following is an example of a valid Catalog resource definition:
or for a Catalog on another machine:
-::
+
{bconfig}{Catalog Resource for remote MySQL}
Catalog
diff --git a/docs/manuals/en/new_main_reference/source/disk.rst b/docs/manuals/en/new_main_reference/source/disk.rst
index 1272d81c05d..70071043b54 100644
--- a/docs/manuals/en/new_main_reference/source/disk.rst
+++ b/docs/manuals/en/new_main_reference/source/disk.rst
@@ -39,7 +39,7 @@ directory. The default directory to store backups on disk is
\footnotesize
-::
+
Device {
Name = FileBackup
@@ -63,7 +63,7 @@ Device resource,
\footnotesize
-::
+
Storage {
Name = FileStorage
@@ -142,7 +142,7 @@ refresh them from the Pool defaults using the
example of the use of one of the above, suppose your Pool resource
contains:
-::
+
{bconfig}{Volume Use Duration}
Pool {
@@ -193,7 +193,7 @@ is simply the Volume name, to which Bareos will append a four digit
number. This number starts at 0001 and is incremented for each Volume
the catalog contains. Thus if you modify your Pool resource to be:
-::
+
{bconfig}{Label Format}
Pool {
@@ -215,7 +215,7 @@ so by adding
:raw-latex:`\linkResourceDirective{Sd}{Device}{Label Media}` = yes to
the :raw-latex:`\configresource{Device}` resource as follows:
-::
+
{bconfig}{Label Media = yes}
Device {
@@ -392,7 +392,7 @@ Director to choose the correct device for restores.
The |bareosDir| configuration is as follows:
-::
+
{bconfig}{}
Director {
@@ -506,7 +506,7 @@ The |bareosDir| configuration is as follows:
and the |bareosSd| configuration is:
-::
+
{bconfig}{}
Storage {
@@ -590,7 +590,7 @@ directory. Set
Example: use four storage devices pointing to the same directory
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-::
+
{bconfig}{\bareosDir configuration: using 4 storage devices}
Director {
@@ -615,7 +615,7 @@ Example: use four storage devices pointing to the same directory
[...]
-::
+
{bconfig}{\bareosSd configuraton: using 4 storage devices}
Storage {
diff --git a/docs/manuals/en/new_main_reference/source/filedconf.rst b/docs/manuals/en/new_main_reference/source/filedconf.rst
index bac41b89a94..8adfb8870dd 100644
--- a/docs/manuals/en/new_main_reference/source/filedconf.rst
+++ b/docs/manuals/en/new_main_reference/source/filedconf.rst
@@ -55,7 +55,7 @@ The following is an example of a valid Client resource definition:
\footnotesize
-::
+
Client { # this is me
Name = rufus-fd
@@ -90,7 +90,7 @@ The following is an example of a valid Director resource definition:
\footnotesize
-::
+
#
# List Directors who are permitted to contact the File daemon
@@ -138,7 +138,7 @@ An example File Daemon configuration file might be the following:
\footnotesize
-::
+
#
# Default Bareos File Daemon Configuration file
diff --git a/docs/manuals/en/new_main_reference/source/howto.rst b/docs/manuals/en/new_main_reference/source/howto.rst
index 928259f188e..ebce1cf7347 100644
--- a/docs/manuals/en/new_main_reference/source/howto.rst
+++ b/docs/manuals/en/new_main_reference/source/howto.rst
@@ -12,7 +12,7 @@ to use a dummy FIFO device to test your configuration, see
Obviously, it can not be used to do a restore.
-::
+
{bconfig}{FIFO Storage Device Configuration}
Device {
@@ -141,7 +141,7 @@ plugin directory and which plugin the **bareos-filedaemon** should use.
You have to edit the **bareos-filedaemon** resource in
``path:C:\Program Data\bareos-fd.conf`` as follows:
-::
+
{bconfig}{MSSQL plugin configuration}
FileDaemon {
@@ -158,7 +158,7 @@ You have to edit the **bareos-filedaemon** resource in
Plugin Test
~~~~~~~~~~~
-::
+
{bconsole}{status client=mssqlserver-fd}
*status client=mssqlserver-fd
@@ -200,7 +200,7 @@ To use the plugin you need to configure it in the fileset as a plugin
resource. For each database instance you need to define a exclusive
backup job and fileset.
-::
+
{bconfig}{MSSQL FileSet}
Fileset {
@@ -246,7 +246,7 @@ Run Backups
Here you can see an example for a backup:
-::
+
{bconsole}{run MSSQL backup job}
*run job=MSSQLBak
@@ -311,7 +311,7 @@ At least you gain a full backup which contains the follow:
\footnotesize
-::
+
@MSSQL/
@MSSQL/default/
@@ -330,7 +330,7 @@ At least you gain a full backup which contains the follow:
\footnotesize
-::
+
/@MSSQL/
/@MSSQL/default/
@@ -348,7 +348,7 @@ Incremental FileSet example:
\footnotesize
-::
+
*@MSSQL/
*default/
@@ -390,7 +390,7 @@ under c:/temp/@MSSQL@/...
Example for a full restore:
-::
+
{bconsole}{restore MSSQL database}
*restore client=mssqlserver-fd
@@ -568,7 +568,7 @@ stopat=
Followed is a example for a restore of full, differential and
incremental backup with a replace of the original database:
-::
+
{bconsole}{restore MSSQL database chain}
*restore client=mssqlserver-fd
@@ -743,7 +743,7 @@ This can be done by using
:raw-latex:`\linkResourceDirective{Dir}{Job}{Run Script}` directives
inside a Job Resource, for example:
-::
+
{bconfig}{RunScript job resource for a PostgreSQL backup}
Job {
@@ -805,7 +805,7 @@ be used. For general information about bpipe, see the
inside the :raw-latex:`\linkResourceDirective{Dir}{FileSet}{Include}`
section of a File Set, e.g.:
-::
+
{bconfig}{bpipe directive for PostgreSQL backup}
FileSet {
@@ -833,7 +833,7 @@ came from.
This can also be used, to backup a database that is running on a remote
host:
-::
+
{bconfig}{bpipe directive to backup a PostgreSQL database that is running on a remote host}
FileSet {
@@ -944,7 +944,7 @@ Activate your plugin directory in the
|bareosFd| configuration. See
:ref:`fdPlugins` for more about plugins in general.
-::
+
{bareosConfigResource}{bareos-fd}{client}{myself}
Client {
@@ -955,7 +955,7 @@ Activate your plugin directory in the
Now include the plugin as command-plugin in the Fileset resource:
-::
+
{bareosConfigResource}{bareos-dir}{fileset}{mysql}
FileSet {
@@ -1019,7 +1019,7 @@ The naming scheme is: :raw-latex:`\directory{fromLSN_toLSN_jobid}`
Example:
-::
+
/tmp/bareos-restores/_percona/351/
|-- 00000000000000000000_00000000000010129154_0000000334
@@ -1070,7 +1070,7 @@ Following settings must be done on the Bareos client
- disable bacula compatibility (default for Bareos :math:`>=` 15.2)
-::
+
{bareosConfigResource}{bareos-fd}{client}{myself}
Client {
@@ -1082,7 +1082,7 @@ Following settings must be done on the Bareos client
Configure the plugin in the |bareosDir|:
-::
+
{bareosConfigResource}{bareos-dir}{fileset}{mysql}
FileSet {
@@ -1163,7 +1163,7 @@ This can be done by using
:raw-latex:`\linkResourceDirective{Dir}{Job}{Run Script}` directives,
for example:
-::
+
{bconfig}{RunScript job resource for a MySQL backup}
Job {
@@ -1224,7 +1224,7 @@ be used. For general information about bpipe, see the
:ref:`bpipe` section. The bpipe plugin is configured
inside the Include section of a File Set, e.g.:
-::
+
{bconfig}{bpipe fileset for MySQL backup}
FileSet {
@@ -1241,7 +1241,7 @@ inside the Include section of a File Set, e.g.:
This can also be used, to backup a database that is running on a remote
host:
-::
+
{bconfig}{bpipe directive to backup a MySQL database that is running on a remote host}
FileSet{
@@ -1260,7 +1260,7 @@ directive, as shown in the examples above, there is the possibility to
restore the dump to the filesystem first, which offers you more control
over the restore process, e.g.:
-::
+
{bconfig}{bpipe directive to backup a MySQL database and restore the dump to the filesystem first}
FileSet{
@@ -1278,7 +1278,7 @@ A very simple corresponding shell script
(:program:`bpipe-restore.sh`) to the method above might look
like the following one:
-::
+
{bconfig}{bpipe shell script for a restore to filesystem}
#!/bin/bash
diff --git a/docs/manuals/en/new_main_reference/source/install.rst b/docs/manuals/en/new_main_reference/source/install.rst
index 5cc1c0ce745..c819330e711 100644
--- a/docs/manuals/en/new_main_reference/source/install.rst
+++ b/docs/manuals/en/new_main_reference/source/install.rst
@@ -136,9 +136,12 @@ requires the :ref:`Jansson library ` package. On
RHEL 7 it is available through the RHEL Server Optional channel. On
CentOS 7 and Fedora is it included on the main repository.
-::
- {commands}{Bareos installation on RHEL $\ge$ 7 / CentOS $\ge$ 7 / Fedora}
+
+
+.. code-block:: sh
+ :caption: Bareos installation on RHEL $\ge$ 7 / CentOS $\ge$ 7 / Fedora
+
#
# define parameter
#
@@ -177,9 +180,12 @@ package is available on
`EPEL `_ 6. Make
sure, it is available on your system.
-::
- {commands}{Bareos installation on RHEL $\ge$ 6 / CentOS $\ge$ 6}
+
+
+.. code-block:: sh
+ :caption: Bareos installation on RHEL $\ge$ 6 / CentOS $\ge$ 6
+
#
# add EPEL repository, if not already present.
# Required for the jansson package.
@@ -218,9 +224,12 @@ package after the one that has the dependency defined. To make sure that
it works, install the desired Bareos database backend package first in a
separate step:
-::
- {commands}{Bareos installation on RHEL 5 / CentOS 5}
+
+
+.. code-block:: sh
+ :caption: Bareos installation on RHEL 5 / CentOS 5
+
#
# define parameter
#
@@ -253,9 +262,12 @@ SUSE Linux Enterprise Server (SLES), openSUSE
pair: Platform; openSUSE
-::
- {commands}{Bareos installation on SLES / openSUSE}
+
+
+.. code-block:: sh
+ :caption: Bareos installation on SLES / openSUSE
+
#
# define parameter
#
@@ -300,9 +312,12 @@ requires the :ref:`Jansson library ` package. On
Ubuntu is it available in Ubuntu Universe. In Debian, is it included in
the main repository.
-::
- {commands}{Bareos installation on Debian / Ubuntu}
+
+
+.. code-block:: sh
+ :caption: Bareos installation on Debian / Ubuntu
+
#
# define parameter
#
@@ -402,9 +417,12 @@ PostgreSQL
If your are using PostgreSQL and your PostgreSQL administration user is
:raw-latex:`\user{postgres}` (default), use following commands:
-::
- {commands}{Setup Bareos catalog with PostgreSQL}
+
+
+.. code-block:: sh
+ :caption: Setup Bareos catalog with PostgreSQL
+
su postgres -c /usr/lib/bareos/scripts/create_bareos_database
su postgres -c /usr/lib/bareos/scripts/make_bareos_tables
su postgres -c /usr/lib/bareos/scripts/grant_bareos_privileges
@@ -419,7 +437,7 @@ RedHat and SUSE distributions. On other systems (Debian, Ubuntu), create
the file :file:`~/.my.cnf` with your authentication
informations:
-::
+
{config}{MySQL credentials file .my.cnf}
[client]
@@ -434,9 +452,12 @@ about how to archieve this. For testing, using a password-less MySQL
connection is probable okay. Setup the Bareos database tables by
following commands:
-::
- {commands}{Setup Bareos catalog with MySQL}
+
+
+.. code-block:: sh
+ :caption: Setup Bareos catalog with MySQL
+
/usr/lib/bareos/scripts/create_bareos_database
/usr/lib/bareos/scripts/make_bareos_tables
/usr/lib/bareos/scripts/grant_bareos_privileges
@@ -450,9 +471,12 @@ future.
Start the daemons
=================
-::
- {commands}{Start the Bareos Daemons}
+
+
+.. code-block:: sh
+ :caption: Start the Bareos Daemons
+
service bareos-dir start
service bareos-sd start
service bareos-fd start
diff --git a/docs/manuals/en/new_main_reference/source/lanaddress.rst b/docs/manuals/en/new_main_reference/source/lanaddress.rst
index 758ebea110d..fb903fef7d3 100644
--- a/docs/manuals/en/new_main_reference/source/lanaddress.rst
+++ b/docs/manuals/en/new_main_reference/source/lanaddress.rst
@@ -15,9 +15,12 @@ accesses the |bareosFd| and |bareosSd| via SNAT
Consider the following scheme:
-::
- {commands}{}
+
+
+.. code-block:: sh
+ :caption:
+
/-------------------\
| | LAN 10.0.0.1/24
| |
@@ -60,7 +63,7 @@ Additionally, devices being in the LAN get the LAN address configured in
the :raw-latex:`\configdirective{Lan Address}` directive. The
configuration looks as follows:
-::
+
{bareosConfigResource}{bareos-dir}{client}{FD\_LAN}
Client {
@@ -70,7 +73,7 @@ configuration looks as follows:
...
}
-::
+
{bareosConfigResource}{bareos-dir}{client}{SD\_LAN}
Storage {
@@ -80,7 +83,7 @@ configuration looks as follows:
...
}
-::
+
{bareosConfigResource}{bareos-dir}{client}{FD\_WAN}
Client {
@@ -89,7 +92,7 @@ configuration looks as follows:
...
}
-::
+
{bareosConfigResource}{bareos-dir}{client}{SD\_WAN}
Storage {
diff --git a/docs/manuals/en/new_main_reference/source/messagesres.rst b/docs/manuals/en/new_main_reference/source/messagesres.rst
index e0827db3251..24ed2f25980 100644
--- a/docs/manuals/en/new_main_reference/source/messagesres.rst
+++ b/docs/manuals/en/new_main_reference/source/messagesres.rst
@@ -170,7 +170,7 @@ all mount messages are sent to the operator (i.e. emailed to
backupoperator@example.com). Finally all messages other than explicitly
skipped files and files saved are sent to the console:
-::
+
{bconfig}{Message resource}
Messages {
@@ -183,7 +183,7 @@ skipped files and files saved are sent to the console:
With the exception of the email address, an example Director’s Messages
resource is as follows:
-::
+
{bconfig}{Message resource}
Messages {
diff --git a/docs/manuals/en/new_main_reference/source/migration.rst b/docs/manuals/en/new_main_reference/source/migration.rst
index 24f827567b5..a3ed303c7d5 100644
--- a/docs/manuals/en/new_main_reference/source/migration.rst
+++ b/docs/manuals/en/new_main_reference/source/migration.rst
@@ -228,7 +228,7 @@ Example Migration Jobs
Assume a simple configuration with a single backup job as described
below.
-::
+
{bconfig}{Backup Job}
# Define the backup Job
@@ -297,7 +297,7 @@ In order to migrate jobs from the
:raw-latex:`\resourcename{Dir}{Pool}{Tape}` pool we add the following
Job resource:
-::
+
{bconfig}{migrate all volumes of a pool}
Job {
@@ -322,7 +322,7 @@ to tape storage.
Another way to accomplish the same is the following Job resource:
-::
+
{bconfig}{migrate all jobs named *Save}
Job {
@@ -368,7 +368,7 @@ Please note:
Example:
-::
+
{bconfig}{bareos-dir.conf: Copy Job between different Storage Daemons}
#bareos-dir.conf
diff --git a/docs/manuals/en/new_main_reference/source/monitorconf.rst b/docs/manuals/en/new_main_reference/source/monitorconf.rst
index 8b88a99feb0..b864cd41c75 100644
--- a/docs/manuals/en/new_main_reference/source/monitorconf.rst
+++ b/docs/manuals/en/new_main_reference/source/monitorconf.rst
@@ -169,7 +169,7 @@ Example Tray Monitor configuration
An example Tray Monitor configuration file might be the following:
-::
+
{bconfig}{Example tray-monitor.conf}
#
@@ -202,7 +202,7 @@ An example Tray Monitor configuration file might be the following:
Example File daemon’s Director record
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-::
+
{bconfig}{Example Monitor resource}
#
@@ -221,7 +221,7 @@ A full example can be found at
Example Storage daemon’s Director record
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-::
+
{bconfig}{Example Monitor resource}
#
@@ -240,7 +240,7 @@ A full example can be found at
Example Director’s Console record
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-::
+
{bconfig}{Example Monitor resource}
#
diff --git a/docs/manuals/en/new_main_reference/source/ndmp.rst b/docs/manuals/en/new_main_reference/source/ndmp.rst
index 2b51f755aa2..a9e22e32e17 100644
--- a/docs/manuals/en/new_main_reference/source/ndmp.rst
+++ b/docs/manuals/en/new_main_reference/source/ndmp.rst
@@ -96,7 +96,7 @@ as the Data Agent.
NDMP 3-way Backup: Data Agent and Tape Agent running on different systems
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-::
+
--+--------------- NETWORK ----+-------------------+----
| -->---->---->-->-->-->\ | //==>==>==>==>\\ |
@@ -121,7 +121,7 @@ and is called NDMP 3-way Backup.
NDMP 2-way Backup: Data Agent and Tape Agent running on the same system
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-::
+
--+--------------- NETWORK ----+---------
| -->---->---->-->-->-->\ |
@@ -321,7 +321,7 @@ System/:raw-latex:`\DataAgent`).
In our example we connect to a Isilon storage appliance emulator:
-::
+
{bconfig}{}
Client {
@@ -336,7 +336,7 @@ In our example we connect to a Isilon storage appliance emulator:
Verify, that you can access your Primary Storage System via Bareos:
-::
+
{bconsole}{verify connection to NDMP Primary Storage System}
*status client=ndmp-client
@@ -419,7 +419,7 @@ To enable the NDMP :raw-latex:`\TapeAgent `inside of the
|bareosSd|, set
:raw-latex:`\linkResourceDirective{Sd}{Storage}{NDMP Enable}`=yes:
-::
+
{bconfig}{enable NDMP in \bareosSd}
#
@@ -442,7 +442,7 @@ AGENT (Secondary Storage) inside of this Storage Daemon.
These are configured by adding a NDMP resource to
:file:`bareos-sd.conf`:
-::
+
{bconfig}{}
#
@@ -466,9 +466,12 @@ Now restart the |bareosSd|. If everything is correct, the
|bareosSd| starts and listens now on the usual port (9103)
and additionally on port 10000 (ndmp).
-::
- {commands}{}
+
+
+.. code-block:: sh
+ :caption:
+
netstat-lntp | grep bareos-sd
tcp 0 0 0.0.0.0:9103 0.0.0.0:* LISTEN 10661/bareos-sd
tcp 0 0 0.0.0.0:10000 0.0.0.0:* LISTEN 10661/bareos-sd
@@ -480,7 +483,7 @@ For NDMP Backups, we always need two storages that are paired together.
The default configuration already has a Storage
:raw-latex:`\resourcename{Dir}{Storage}{File}` defined:
-::
+
{bconfig}{}
Storage {
@@ -494,7 +497,7 @@ The default configuration already has a Storage
We now add a paired storage to the already existing
:raw-latex:`\resourcename{Dir}{}{File}` storage:
-::
+
{bconfig}{}
#
@@ -524,7 +527,7 @@ can resolve the name or use an IP address.
Now save the director resource and restart the |bareosDir|.
Verify that the configuration is correct:
-::
+
{bconsole}{verify connection to the \bareosSd}
*status storage=NDMPFile
@@ -584,7 +587,7 @@ specified in the Options Block of the Fileset with the
available is partly depending on the NDMP implementation of the Storage
Appliance.
-::
+
{bconfig}{NDMP Fileset}
Fileset {
@@ -663,7 +666,7 @@ OneFS 7.2.0.1. See
details about the supported NDMP environment variables. Excludes are not
used in this example.
-::
+
{bconfig}{NDMP Fileset Isilon Include/Exclude}
Fileset {
@@ -693,7 +696,7 @@ Bareos Director: Configure NDMP Jobs
To do NDMP backups and restores, some special settings need to be
configured. We define special Backup and Restore jobs for NDMP.
-::
+
{bconfig}{NDMP backup job}
Job {
@@ -709,7 +712,7 @@ configured. We define special Backup and Restore jobs for NDMP.
Messages = Standard
}
-::
+
{bconfig}{NDMP restore job}
Job {
@@ -743,7 +746,7 @@ Run NDMP Backup
Now we are ready to do our first NDMP backup:
-::
+
{bconsole}{run NDMP backup}
*run job=ndmp-backup-job
@@ -863,7 +866,7 @@ We have successfully created our first NDMP backup.
Let us have a look what files are in our backup:
-::
+
{bconsole}{list the files of the backup job}
*list files jobid=1
@@ -896,7 +899,7 @@ backup job, than only the main backup file is available.
Restore files to original path
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-::
+
{bconsole}{}
*restore jobid=1
@@ -1080,7 +1083,7 @@ When this is done, add a second storage resource
:raw-latex:`\resourcename{Dir}{Storage}{File2}` to the
:file:`bareos-dir.conf`:
-::
+
{bconfig}{Storage resource File2}
Storage {
@@ -1097,7 +1100,7 @@ where the copies will be written to:
Add a Pool that the copies will run to:
-::
+
{bconfig}{Pool resource Copy}
#
@@ -1122,7 +1125,7 @@ that actually holds the data to be copied.
In our case this is the :raw-latex:`\resourcename{Dir}{Pool}{Full}`
Pool:
-::
+
{bconfig}{add Next Pool setting}
#
@@ -1141,7 +1144,7 @@ data via the :raw-latex:`\resourcename{Dir}{Storage}{File}` Storage and
writing the data via the :raw-latex:`\resourcename{Dir}{Storage}{File2}`
Storage:
-::
+
{bconfig}{NDMP copy job}
Job {
@@ -1156,7 +1159,7 @@ Storage:
After restarting the director and storage daemon, we can run the Copy
job:
-::
+
{bconsole}{run copy job}
*run job=NDMPCopy
@@ -1247,7 +1250,7 @@ Restore to NDMP Primary Storage System
Unfortunately, we are not able to restore the copied data to our NDMP
storage. If we try we get this message:
-::
+
{}
21-Jan 09:21 bareos-dir JobId 77: Fatal error: Read storage File2 doesn't point to storage definition with paired storage option.
@@ -1258,7 +1261,7 @@ definition is very similar to our
:raw-latex:`\resourcename{Dir}{Storage}{NDMPFile}` Storage, as we want
to restore the data to the same NDMP Storage system:
-::
+
{bconfig}{add paired Storage resource for File2}
Storage {
@@ -1356,7 +1359,7 @@ Configure a NDMP Client
This defines the connection to the NDMP Data Agent.
-::
+
{bareosConfigResource}{bareos-dir}{Client}{isilon}
Client {
@@ -1373,7 +1376,7 @@ This defines the connection to the NDMP Data Agent.
Verify, that you can access your Primary Storage System
(:raw-latex:`\TapeAgent`) via Bareos:
-::
+
{bconsole}{status ndmp client}
*status client=isilon
@@ -1446,7 +1449,7 @@ Configure a NDMP Fileset
This determines what filesystem to backup and configures the NDMP
environment to use in the meta options for it.
-::
+
{bareosConfigResource}{bareos-dir}{Fileset}{isilon}
Fileset {
@@ -1477,7 +1480,7 @@ As we do not yet now the device names, we can put a placeholder string
in :raw-latex:`\linkResourceDirective{Dir}{Storage}{Device}` and
:raw-latex:`\linkResourceDirective{Dir}{Storage}{NDMP Changer Device}`:
-::
+
{bareosConfigResource}{bareos-dir}{Storage}{isilon}
Storage {
@@ -1503,7 +1506,7 @@ The :raw-latex:`\TapeAgent `will return information about the available
tape drives. The :raw-latex:`\RobotAgent `will return information about
the available tape changer device.
-::
+
{bconsole}{status ndmp storage (Tape Agent and Robot Agent)}
*status storage=isilon
@@ -1562,7 +1565,7 @@ We now know the device names and can configure what robot and what tape
to use when this storage is used by bareos by updating the
:raw-latex:`\resourcename{Sd}{Storage}{isilon}` resource:
-::
+
{bareosConfigResource}{bareos-dir}{Storage}{isilon}
Storage {
@@ -1584,7 +1587,7 @@ to use when this storage is used by bareos by updating the
Configure a Pool for the NDMP Tapes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-::
+
{bareosConfigResource}{bareos-dir}{Pool}{NDMP-Tape}
Pool {
@@ -1601,7 +1604,7 @@ Configure NDMP Jobs
To be able to do scheduled backups, we need to configure a backup job
that will use the NDMP client and NDMP storage resources:
-::
+
{bareosConfigResource}{bareos-dir}{Job}{ndmp-native-backup-job}
Job {
@@ -1621,7 +1624,7 @@ that will use the NDMP client and NDMP storage resources:
As we also need to be able to do a restore of the backuped data, we also
need to define an adequate restore job:
-::
+
{bareosConfigResource}{bareos-dir}{Job}{ndmp-native-restore-job}
Job{
@@ -1646,7 +1649,7 @@ tapes that should be used.
First we check if our robot has tapes with barcodes by running status
slots:
-::
+
{bconsole}{status storage=isilon slots}
*status slots
@@ -1669,7 +1672,7 @@ slots:
Now we can label these tapes and add them to the pool that we have
created for NDMP Tapes:
-::
+
{bconsole}{label barcodes}
*label storage=isilon barcodes slots=251-257
@@ -1718,7 +1721,7 @@ used for NDMP Backups.
Run NDMP_NATIVE Backup
----------------------
-::
+
{bconsole}{run backup job}
*run job=ndmp-native-backup-job yes
@@ -1897,7 +1900,7 @@ Run NDMP_NATIVE Restore
Now we want to restore some files from the backup we just did:
-::
+
{bconsole}{run ndmp restore job}
*restore
@@ -2152,7 +2155,7 @@ a Full (0) or Differential (1) will be made. The maximum backup level
will be 9. Additional Incremental backups will result in a failed job
and the message:
-::
+
{}
2016-01-21 13:35:51 bareos-dir JobId 12: Fatal error: NDMP dump format doesn't support more than 8 incrementals, please run a Differential or a Full Backup
diff --git a/docs/manuals/en/new_main_reference/source/passiveclient.rst b/docs/manuals/en/new_main_reference/source/passiveclient.rst
index 199f90051b7..93a60f27a6f 100644
--- a/docs/manuals/en/new_main_reference/source/passiveclient.rst
+++ b/docs/manuals/en/new_main_reference/source/passiveclient.rst
@@ -43,7 +43,7 @@ To use this new feature, just configure
:raw-latex:`\linkResourceDirective{Dir}{Client}{Passive}`=yes in the
client definition of the |bareosDir|:
-::
+
{bconfig}{Enable passive mode in bareos-dir.conf}
Client {
@@ -59,7 +59,7 @@ Also, prior to bareos version 15, you need to set
Version 15, the compatible option is set to no per default and does not
need to be specified anymore.
-::
+
{bconfig}{Disable compatible mode for the \bareosFd in bareos-fd.conf}
Director {
diff --git a/docs/manuals/en/new_main_reference/source/pools.rst b/docs/manuals/en/new_main_reference/source/pools.rst
index 436e5eeed55..6dc3817fccc 100644
--- a/docs/manuals/en/new_main_reference/source/pools.rst
+++ b/docs/manuals/en/new_main_reference/source/pools.rst
@@ -110,7 +110,7 @@ Putting a single Full backup on each Volume, will require six Full save
Volumes, and a retention period of six months. The Pool needed to do
that is:
-::
+
{bconfig}{Full-Pool}
Pool {
@@ -159,7 +159,7 @@ For the Differential backup Pool, we choose a retention period of a bit
longer than a month and ensure that there is at least one Volume for
each of the maximum of five weeks in a month. So the following works:
-::
+
{bconfig}{Differential Pool}
Pool {
@@ -202,7 +202,7 @@ Incremental Pool
Finally, here is the resource for the Incremental Pool:
-::
+
{bconfig}{Incremental Pool}
Pool {
@@ -240,7 +240,7 @@ minor modifications to simplify things.
The Director’s configuration file is as follows:
-::
+
{bconfig}{bareos-dir.conf}
Director { # define myself
@@ -426,7 +426,7 @@ The Director’s configuration file is as follows:
and the Storage daemon’s configuration file is:
-::
+
{bconfig}{bareos-sd.conf}
Storage { # definition of myself
diff --git a/docs/manuals/en/new_main_reference/source/programs.rst b/docs/manuals/en/new_main_reference/source/programs.rst
index 6d59f3dafc7..cfa707afbcd 100644
--- a/docs/manuals/en/new_main_reference/source/programs.rst
+++ b/docs/manuals/en/new_main_reference/source/programs.rst
@@ -231,7 +231,7 @@ First construct a **bootstrap** file named say,
\footnotesize
-::
+
Volume=tapevolume1|tapevolume2
@@ -241,17 +241,23 @@ First construct a **bootstrap** file named say,
where each Volume is separated by a vertical bar. Then simply use:
-::
- {commands}{}
+
+
+.. code-block:: sh
+ :caption:
+
bls -b list.bsr /dev/nst0
In the case of Bareos Volumes that are on files, you may simply append
volumes as follows:
-::
- {commands}{}
+
+
+.. code-block:: sh
+ :caption:
+
bls /var/lib/bareos/storage/volume1\|volume2
where the backslash (\) was necessary as a shell escape to permit
@@ -263,22 +269,28 @@ complicated with a bootstrap file, you can use the
:program:`bcopy`) to specify one or more Volume names
separated by the vertical bar (:raw-latex:`\textbar`). For example:
-::
- {commands}{}
+
+
+.. code-block:: sh
+ :caption:
+
bls /dev/nst0 -V tapevolume1
You may also specify an asterisk (*) to indicate that the program should
accept any volume. For example:
-::
- {commands}{}
+
+
+.. code-block:: sh
+ :caption:
+
bls /dev/nst0 -V*
If your |bareosSd| has following resource,
-::
+
{bareosConfigResource}{bareos-sd}{device}{FileStorage}
Device {
@@ -289,23 +301,32 @@ If your |bareosSd| has following resource,
following calls of :program:`bls` should behave identical:
-::
- {commands}{bls using Storage Device Name}
+
+
+.. code-block:: sh
+ :caption: bls using Storage Device Name
+
bls FileStorage -V Full1
or
-::
- {commands}{bls using the Archive Device of a Storage Device}
+
+
+.. code-block:: sh
+ :caption: bls using the Archive Device of a Storage Device
+
bls /var/lib/bareos/storage -V Full1
or
-::
- {commands}{bls using the Archive Device of a Storage Device and volume name}
+
+
+.. code-block:: sh
+ :caption: bls using the Archive Device of a Storage Device and volume name
+
bls /var/lib/bareos/storage/Full1
Specifying Maximum Block Size
@@ -332,9 +353,12 @@ bls
:program:`ls` type listing of a Bareos tape or file. It is
called:
-::
- {commands}{}
+
+
+.. code-block:: sh
+ :caption:
+
Usage: bls [options]
-b specify a bootstrap file
-c specify a Storage configuration file
@@ -359,37 +383,52 @@ command for each volume.
For example, to list the contents of a tape:
-::
- {commands}{}
+
+
+.. code-block:: sh
+ :caption:
+
bls -V Volume-name /dev/nst0
Or to list the contents of a volume file:
-::
- {commands}{}
+
+
+.. code-block:: sh
+ :caption:
+
bls FileStorage -V Full1
or
-::
- {commands}{}
+
+
+.. code-block:: sh
+ :caption:
+
bls /var/lib/bareos/storage -V Full1
or
-::
- {commands}{}
+
+
+.. code-block:: sh
+ :caption:
+
bls /var/lib/bareos/storage/Full1
For example:
-::
- {commands}{}
+
+
+.. code-block:: sh
+ :caption:
+
blsFileStorage -V Full1
bls: butil.c:282-0 Using device: "/var/lib/bareos/storage" for reading.
12-Sep 18:30 bls JobId 0: Ready to read from volume "Full1" on device "FileStorage" (/var/lib/bareos/storage).
@@ -412,9 +451,12 @@ Show Detailed File Information
To retrieve information, about how a file is stored on the volume, you
can use :program:`bls` in verbose mode:
-::
- {commands}{}
+
+
+.. code-block:: sh
+ :caption:
+
blsFileStorage -V TestVolume001 -v
bls: butil.c:273-0 Using device: "FileStorage" for reading.
22-Jun 19:34 bls JobId 0: Ready to read from volume "TestVolume001" on device "Storage1" (/var/lib/bareos/storage).
@@ -447,9 +489,12 @@ Show Label Information
Using the :raw-latex:`\parameter{-L}` the label information of a Volume
is shown:
-::
- {commands}{bls: show volume label}
+
+
+.. code-block:: sh
+ :caption: bls: show volume label
+
bls-L /var/lib/bareos/storage/testvol
bls: butil.c:282-0 Using device: "/var/lib/bareos/storage" for reading.
12-Sep 18:41 bls JobId 0: Ready to read from volume "testvol" on device "FileStorage" (/var/lib/bareos/storage).
@@ -482,9 +527,12 @@ If you are listing a Volume to determine what Jobs to restore, normally
the :raw-latex:`\parameter{-j}` option provides you with most of what
you will need as long as you don’t have multiple clients. For example:
-::
- {commands}{bls: list jobs}
+
+
+.. code-block:: sh
+ :caption: bls: list jobs
+
bls/var/lib/bareos/storage/testvol -j
bls: butil.c:282-0 Using device: "/var/lib/bareos/storage" for reading.
12-Sep 18:33 bls JobId 0: Ready to read from volume "testvol" on device "FileStorage" (/var/lib/bareos/storage).
@@ -526,9 +574,12 @@ Normally, except for debugging purposes, you will not need to list
Bareos blocks (the "primitive" unit of Bareos data on the Volume).
However, you can do so with:
-::
- {commands}{}
+
+
+.. code-block:: sh
+ :caption:
+
bls-k /tmp/File002
bls: butil.c:148 Using device: /tmp
Block: 1 size=64512
@@ -543,9 +594,12 @@ By adding the :raw-latex:`\parameter{-v}` option, you can get more
information, which can be useful in knowing what sessions were written
to the volume:
-::
- {commands}{}
+
+
+.. code-block:: sh
+ :caption:
+
bls-k -v /tmp/File002
Date label written: 2002-10-19 at 21:16
Block: 1 blen=64512 First rec FI=VOL_LABEL SessId=1 SessTim=1035062102 Strm=0 rlen=147
@@ -564,9 +618,12 @@ anything.
If you want to know even more, add a second :raw-latex:`\parameter{-v}`
to the command line to get a dump of every record in every block.
-::
- {commands}{}
+
+
+.. code-block:: sh
+ :caption:
+
bls-k -vv /tmp/File002
bls: block.c:79 Dump block 80f8ad0: size=64512 BlkNum=1
Hdrcksum=b1bdfd6d cksum=b1bdfd6d
@@ -639,9 +696,12 @@ Please note that some of the current limitations of
It is called:
-::
- {commands}{}
+
+
+.. code-block:: sh
+ :caption:
+
Usage: bextract
-b specify a bootstrap file
-c specify a Storage configuration file
@@ -692,7 +752,7 @@ For example, if the file **include-list** contains:
\footnotesize
-::
+
/etc/bareos
/usr/sbin
@@ -703,9 +763,12 @@ For example, if the file **include-list** contains:
Then the command:
-::
- {commands}{}
+
+
+.. code-block:: sh
+ :caption:
+
bextract -i include-list -V Volume /dev/nst0 /tmp
will restore from the Bareos archive **/dev/nst0** all files and
@@ -725,9 +788,12 @@ most control over which files will be restored. For more details on the
chapter of this document. Note, you may also use a bootstrap file
produced by the **restore** command. For example:
-::
- {commands}{}
+
+
+.. code-block:: sh
+ :caption:
+
bextract -b bootstrap-file /dev/nst0 /tmp
The bootstrap file allows detailed specification of what files you want
@@ -770,9 +836,12 @@ would not be required.
After installing, :program:`bextract` can be called via
command line:
-::
- {commands}{Call of bextract}
+
+
+.. code-block:: sh
+ :caption: Call of bextract
+
C:\Program Files\Bareos .\bextract.exe -c "C:\ProgrammData\Bareos\bareos-sd.conf" -V
If you want to use exclude or include files you need to write them like
@@ -780,15 +849,18 @@ you do on Linux. That means each path begins with a "/" and not with
"yourdrive:/". You need to specify the parameter **-e exclude.list** as
first parameter. For example:
-::
+
{config}{Example exclude.list}
/Program Files/Bareos/bareos-dir.exe
/ProgramData/
-::
- {commands}{Call bextract with exclude list}
+
+
+.. code-block:: sh
+ :caption: Call bextract with exclude list
+
C:\Program Files\Bareos .\bextract.exe -e exclude.list -c "C:\ProgrammData\Bareos\bareos-sd.conf" -V
bscan
@@ -835,9 +907,12 @@ system or a file to its previous state.
It is called:
-::
- {commands}{}
+
+
+.. code-block:: sh
+ :caption:
+
Usage: bscan [options]
-B specify the database driver name (default NULL)
-b bootstrap specify a bootstrap file
@@ -891,9 +966,12 @@ can recreate the catalog entries for those Volumes and then use the
**restore** command in the Console to restore whatever you want. A
command something like:
-::
- {commands}{}
+
+
+.. code-block:: sh
+ :caption:
+
bscan -v -V Vol001|Vol002 /dev/nst0
will give you an idea of what is going to happen without changing your
@@ -908,9 +986,12 @@ Volumes. This must correspond to the Archive Device in the conf file.
Then to actually write or store the records in the catalog, add the
**-s** option as follows:
-::
- {commands}{}
+
+
+.. code-block:: sh
+ :caption:
+
bscan -s -m -v -V Vol001|Vol002 /dev/nst0
When writing to the database, if :program:`bscan` finds
@@ -921,9 +1002,12 @@ existing data. Any missing data will simply be added.
If you have multiple tapes, you should scan them with:
-::
- {commands}{}
+
+
+.. code-block:: sh
+ :caption:
+
bscan -s -m -v -V Vol001|Vol002|Vol003 /dev/nst0
Since there is a limit on the command line length (511 bytes) accepted
@@ -938,7 +1022,7 @@ for more details, in particular the section entitled
\footnotesize
-::
+
Volume=Vol001
Volume=Vol002
@@ -1016,9 +1100,12 @@ you should start with a freshly created catalog that contains no data.
Starting with a single Volume named **TestVolume1**, you run a command
such as:
-::
- {commands}{}
+
+
+.. code-block:: sh
+ :caption:
+
bscan -V TestVolume1 -v -s -m /dev/nst0
If there is more than one volume, simply append it to the first one
@@ -1035,16 +1122,22 @@ incrementals, I reinitialized the SQLite database as described above,
and using the bootstrap.bsr file noted above, I entered the following
command:
-::
- {commands}{}
+
+
+.. code-block:: sh
+ :caption:
+
bscan -b bootstrap.bsr -v -s /dev/nst0
which produced the following output:
-::
- {commands}{}
+
+
+.. code-block:: sh
+ :caption:
+
bscan: bscan.c:182 Using Database: Bareos, User: bacula
bscan: bscan.c:673 Created Pool record for Pool: Default
bscan: bscan.c:271 Pool type "Backup" is OK.
@@ -1098,7 +1191,7 @@ each Job record it encountered.
Now if you start Bareos and enter a :raw-latex:`\bcommand{list}{jobs}`
command to the console program, you will get:
-::
+
{bconsole}{list jobs}
+-------+----------+------------------+------+-----+----------+----------+---------+
@@ -1197,9 +1290,12 @@ data, cannot be accessed directly from existing catalog entries. If you
wish to be able to use the Volume with the Console restore command, for
example, you must first bscan the new Volume into the catalog.
-::
- {commands}{}
+
+
+.. code-block:: sh
+ :caption:
+
Usage: bcopy [-d debug_level]
-b bootstrap specify a bootstrap file
-c specify configuration file
@@ -1255,9 +1351,12 @@ The physical device name must be specified on the command line, and this
same device name must be present in the Storage daemon’s configuration
file read by :program:`btape`.
-::
- {commands}{}
+
+
+.. code-block:: sh
+ :caption:
+
Usage: btape
-b specify bootstrap file
-c set configuration file to file
@@ -1294,7 +1393,7 @@ btape Commands
The full list of commands are:
-::
+
{bconsole}{btape commands}
Command Description
@@ -1377,7 +1476,7 @@ This command can have the following arguments:
- This flag permits to skip tests with Bareos block access.
-::
+
{bconsole}{btape speed}
*speed file_size=3 skip_raw
@@ -1493,9 +1592,12 @@ on Unix systems. It can even be used on Windows machines.
It is called:
-::
- {commands}{bsmtp}
+
+
+.. code-block:: sh
+ :caption: bsmtp
+
Usage: bsmtp [-f from] [-h mailhost] [-s subject] [-c copy] [recipient ...]
-4 forces bsmtp to use IPv4 addresses only.
-6 forces bsmtp to use IPv6 addresses only.
@@ -1535,7 +1637,7 @@ the following statement in the
:ref:`Messages resource ` of your
|bareosDir| configuration.
-::
+
{bconfig}{bsmtp in Message resource}
Mail Command = "bsmtp -h mail.example.com -f \"\(Bareos\) %r\" -s \"Bareos: %t %e of %c %l\" %r"
@@ -1611,9 +1713,12 @@ as the |bareosDir| is running, normally
Linux, use the following command to switch to user
:raw-latex:`\user{bareos}`:
-::
- {commands}{Substitute user to bareos}
+
+
+.. code-block:: sh
+ :caption: Substitute user to bareos
+
su -s /bin/bash - bareos
If not, problems of reading the Bareos configuration or accessing the
@@ -1622,9 +1727,12 @@ database can arise.
:program:`bareos-dbcheck` supports following command line
options:
-::
- {commands}{}
+
+
+.. code-block:: sh
+ :caption:
+
Usage: bareos-dbcheck [-c config ] [-B] [-C catalog name] [-d debug level] [-D driver name] [] []
-b batch mode
-C catalog name in the director conf file
@@ -1646,9 +1754,12 @@ If the :raw-latex:`\parameter{-B}` option is specified,
:program:`bareos-dbcheck` will print out catalog information
in a simple text based format:
-::
- {commands}{}
+
+
+.. code-block:: sh
+ :caption:
+
# bareos-dbcheck -B
catalog=MyCatalog
db_type=SQLite
@@ -1676,9 +1787,12 @@ all programmed inconsistency checks. If the :raw-latex:`\parameter{-b}`
option is not specified, :program:`bareos-dbcheck` will
enter interactive mode and prompt with the following:
-::
- {commands}{}
+
+
+.. code-block:: sh
+ :caption:
+
Hello, this is the database check/correct program.
Modify database is off. Verbose is off.
Please select the function you want to perform.
@@ -1827,7 +1941,7 @@ regex expressions can be complicated.
To run it, use:
-::
+
Usage: bregex [-d debug_level] -f
-f specify file of data to be matched
@@ -1864,7 +1978,7 @@ test wild-card expressions against a file of data.
To run it, use:
-::
+
Usage: bwild [-d debug_level] -f
-f specify file of data to be matched
diff --git a/docs/manuals/en/new_main_reference/source/quickstart.rst b/docs/manuals/en/new_main_reference/source/quickstart.rst
index 7b58abbd161..35d0bca1f0d 100644
--- a/docs/manuals/en/new_main_reference/source/quickstart.rst
+++ b/docs/manuals/en/new_main_reference/source/quickstart.rst
@@ -133,9 +133,12 @@ also connects to the database and checks if the catalog schema version
is correct. Depending on your database, only the
:raw-latex:`\user{bareos}` has permission to access it.
-::
- {commands}{Testing Configuration Files}
+
+
+.. code-block:: sh
+ :caption: Testing Configuration Files
+
su bareos -s /bin/sh -c "/usr/sbin/bareos-dir -t"
su bareos -s /bin/sh -c "/usr/sbin/bareos-sd -t"
bareos-fd -t
diff --git a/docs/manuals/en/new_main_reference/source/recycling.rst b/docs/manuals/en/new_main_reference/source/recycling.rst
index 8579b1954f5..2a72265f3e4 100644
--- a/docs/manuals/en/new_main_reference/source/recycling.rst
+++ b/docs/manuals/en/new_main_reference/source/recycling.rst
@@ -428,7 +428,7 @@ Recycle status for each Volume. For example in the following output from
\footnotesize
-::
+
+----------+-------+--------+---------+------------+--------+-----+
| VolumeNa | Media | VolSta | VolByte | LastWritte | VolRet | Rec |
@@ -465,7 +465,7 @@ To modify Volume **File0001** so that it cannot be recycled, you use the
\footnotesize
-::
+
+----------+------+-------+---------+-------------+-------+-----+
| VolumeNa | Media| VolSta| VolByte | LastWritten | VolRet| Rec |
@@ -496,7 +496,7 @@ created by Arno Lehmann:
\footnotesize
-::
+
A typical volume life cycle is like this:
@@ -576,7 +576,7 @@ scheme?
\footnotesize
-::
+
Schedule {
Name = "NightlySave"
@@ -670,7 +670,7 @@ your Director’s configuration file:
\footnotesize
-::
+
Schedule {
Name = "30 minute cycle"
@@ -737,7 +737,7 @@ configuration file:
\footnotesize
-::
+
Device {
Name = FileStorage
diff --git a/docs/manuals/en/new_main_reference/source/rescue.rst b/docs/manuals/en/new_main_reference/source/rescue.rst
index 0603fb197e5..5db9315caf1 100644
--- a/docs/manuals/en/new_main_reference/source/rescue.rst
+++ b/docs/manuals/en/new_main_reference/source/rescue.rst
@@ -130,7 +130,7 @@ to protect with ReaR and Bareos references this system by the name
:raw-latex:`\parameter{bareosclient-fd}`, the only configuration for
ReaR is:
-::
+
{config}{}
BACKUP=BAREOS
@@ -146,7 +146,7 @@ For example, if you want to create an ISO image and store it to an NFS
server with the IP Address 192.168.10.1, you can use the following
configuration:
-::
+
{config}{Full Rear configuration in /etc/rear/local.conf}
# This is default:
@@ -164,9 +164,12 @@ Backup
If you have installed and configured ReaR on your system, type
-::
- {commands}{Create Rescue Image}
+
+
+.. code-block:: sh
+ :caption: Create Rescue Image
+
rear -v mkrescue
to create the rescue image. If you used the configuration example above,
@@ -187,9 +190,12 @@ In case, you want to recover your system, boot it using the generated
ReaR recovery ISO. After booting log in as user :raw-latex:`\user{root}`
and type
-::
- {commands}{Restore your system using Rear and Bareos}
+
+
+.. code-block:: sh
+ :caption: Restore your system using Rear and Bareos
+
rear recover
ReaR will now use the most recent backup from Bareos to restore your
diff --git a/docs/manuals/en/new_main_reference/source/restore.rst b/docs/manuals/en/new_main_reference/source/restore.rst
index a436e6cc31e..bb363d9cf4b 100644
--- a/docs/manuals/en/new_main_reference/source/restore.rst
+++ b/docs/manuals/en/new_main_reference/source/restore.rst
@@ -85,7 +85,7 @@ details on this.
Within the Console program, after entering the **restore** command, you
are presented with the following selection prompt:
-::
+
{bconsole}{restore}
* restore
@@ -218,7 +218,7 @@ state). If you have not specified a client=xxx on the command line, it
it will then ask for the desired Client, which on my system, will print
all the Clients found in the database as follows:
-::
+
{bconsole}{restore: select client}
Select item: (1-13): 5
@@ -243,7 +243,7 @@ to know what FileSet is to be restored, so it prompts with:
\footnotesize
-::
+
The defined FileSet resources are:
1: Full Set
@@ -268,7 +268,7 @@ Note, some of the columns are truncated here for presentation:
\footnotesize
-::
+
+-------+------+----------+-------------+-------------+------+-------+------------+
| JobId | Levl | JobFiles | StartTime | VolumeName | File | SesId |VolSesTime |
@@ -334,7 +334,7 @@ While in file selection mode, you can enter **help** or a question mark
\footnotesize
-::
+
Command Description
======= ===========
@@ -381,7 +381,7 @@ which displays:
\footnotesize
-::
+
128401 total files. 128401 marked to be restored.
@@ -398,7 +398,7 @@ Bareos prints:
\footnotesize
-::
+
Run Restore job
JobName: RestoreFiles
@@ -473,7 +473,7 @@ include the full path and filename. No wild cards are used.
To enter the files, after the **restore**, you select item number 7 from
the prompt list:
-::
+
{bconsole}{restore list of files}
* restore
@@ -504,7 +504,7 @@ which then prompts you for the client name:
\footnotesize
-::
+
Defined Clients:
1: client1
@@ -524,7 +524,7 @@ you to enter a filename:
\footnotesize
-::
+
Enter filename:
@@ -538,7 +538,7 @@ At this point, you can enter the full path and filename
\footnotesize
-::
+
Enter filename: /etc/resolv.conf
Enter filename:
@@ -554,7 +554,7 @@ the file, it prints the following:
\footnotesize
-::
+
Enter filename: junk filename
No database record found for: junk filename
@@ -574,7 +574,7 @@ files in say **/tmp/file-list**, then using the following command:
\footnotesize
-::
+
restore client=client1 file= = / ! ; % : , ~ # = &
@@ -952,7 +952,7 @@ Example Restore Job Resource
\footnotesize
-::
+
Job {
Name = "RestoreFiles"
@@ -1165,6 +1165,6 @@ help
If your filename contains some weird caracters, you can use ``?``, ``*``
or \\\. For example, if your filename contains a \\, you can use \\\\\.
-::
+
* mark weird_file\\\\with-backslash
diff --git a/docs/manuals/en/new_main_reference/source/security.rst b/docs/manuals/en/new_main_reference/source/security.rst
index 49683033de1..6950a877e2e 100644
--- a/docs/manuals/en/new_main_reference/source/security.rst
+++ b/docs/manuals/en/new_main_reference/source/security.rst
@@ -356,7 +356,7 @@ normal delete routine.
If files are securely erased during a job, the secure delete command
output will be shown in the job log.
-::
+
{logging}{bareos.log}
08-Sep 12:58 win-fd JobId 10: secure_erase: executing C:/cygwin64/bin/shred.exe "C:/temp/bareos-restores/C/Program Files/Bareos/Plugins/bareos_fd_consts.py"
@@ -370,7 +370,7 @@ If the secure erase command is configured, the current value is printed.
Example:
-::
+
{bconsole}{}
* status dir
diff --git a/docs/manuals/en/new_main_reference/source/storedconf.rst b/docs/manuals/en/new_main_reference/source/storedconf.rst
index ce27ac1e424..c516111ca75 100644
--- a/docs/manuals/en/new_main_reference/source/storedconf.rst
+++ b/docs/manuals/en/new_main_reference/source/storedconf.rst
@@ -66,7 +66,7 @@ definition.
The following is a typical Storage daemon storage resource definition.
-::
+
{bconfig}{Storage daemon storage definition}
#
@@ -97,7 +97,7 @@ the corresponding values in the Director’s configuration file.
The following is an example of a valid Director resource definition:
-::
+
{bconfig}{Storage daemon Director definition}
Director {
@@ -164,7 +164,7 @@ substitution of the following characters:
\footnotesize
-::
+
%% = %
%a = Archive device name
@@ -221,7 +221,10 @@ Devices that require a mount (USB)
Where that script contains:
- \begin{verbatim}{commands}{}
+ \begin{verbatim}
+.. code-block:: sh
+ :caption:
+
#!/bin/sh
ndasadmin enable -s 1 -o w
sleep 2
diff --git a/docs/manuals/en/new_main_reference/source/supportedoses.rst b/docs/manuals/en/new_main_reference/source/supportedoses.rst
index 68e8b3722d3..90dc6019a81 100644
--- a/docs/manuals/en/new_main_reference/source/supportedoses.rst
+++ b/docs/manuals/en/new_main_reference/source/supportedoses.rst
@@ -315,9 +315,12 @@ Assuming your client has the DNS entry
|bareosDir| as
:raw-latex:`\resourcename{bareos-dir}{client}{client2-fd}`:
-::
- {commands}{}
+
+
+.. code-block:: sh
+ :caption:
+
scp /etc/bareos/bareos-dir-export/client/client2-fd/bareos-fd.d/director/bareos-dir.conf root@client2.example.com:/usr/local/etc/bareos/bareos-fd.d/director/
This differs in so far, as on Linux the configuration files are located
@@ -340,14 +343,17 @@ Select the ``path:bareos-dir.conf`` file and open it.
Alternatively you can also call following command on the command
console:
-::
- {commands}{}
+
+
+.. code-block:: sh
+ :caption:
+
open -t /usr/local/etc/bareos/bareos-fd.d/director/bareos-dir.conf
The file should look similar to this:
-::
+
{bareosConfigResource}{bareos-fd}{director}{bareos-dir}
Director {
@@ -368,9 +374,12 @@ Restart bareos-fd after changing the configuration
The bareos-fd must be restarted to reread its configuration:
-::
- {commands}{Restart the \bareosFd}
+
+
+.. code-block:: sh
+ :caption: Restart the \bareosFd
+
sudo launchctl stop org.bareos.bareos-fd
sudo launchctl start org.bareos.bareos-fd
@@ -380,7 +389,7 @@ Verify that the Bareos File Daemon is working
Open the :program:`bconsole` on your
|bareosDir| and check the status of the client with
-::
+
{bconfig}{}
*status client=client2-fd
@@ -388,9 +397,12 @@ Open the :program:`bconsole` on your
In case, the client does not react, following command are useful the
check the status:
-::
- {commands}{Verify the status of \bareosFd}
+
+
+.. code-block:: sh
+ :caption: Verify the status of \bareosFd
+
# check if bareos-fd is started by system:
sudo launchctl list org.bareos.bareos-fd
@@ -405,7 +417,10 @@ check the status:
You can also manually start bareos-fd in debug mode by:
-::
- {commands}{Start \bareosFd in debug mode}
+
+
+.. code-block:: sh
+ :caption: Start \bareosFd in debug mode
+
sudo /usr/local/sbin/bareos-fd -f -d 100
diff --git a/docs/manuals/en/new_main_reference/source/tape-without-autochanger.rst b/docs/manuals/en/new_main_reference/source/tape-without-autochanger.rst
index 1b75030d864..7cfb5fc5e5b 100644
--- a/docs/manuals/en/new_main_reference/source/tape-without-autochanger.rst
+++ b/docs/manuals/en/new_main_reference/source/tape-without-autochanger.rst
@@ -236,7 +236,7 @@ For example, his bareos-dir.conf file looks like the following:
\footnotesize
-::
+
# /etc/bareos/bareos-dir.conf
@@ -430,7 +430,7 @@ and then rewinds and ejects the tape. The following is a copy of
\footnotesize
-::
+
#! /bin/sh
/usr/lib/bareos/delete_catalog_backup
@@ -448,7 +448,7 @@ Finally, if you list his Volumes, you get something like the following:
\footnotesize
-::
+
*list media
Using default Catalog name=MyCatalog DB=bareos
diff --git a/docs/manuals/en/new_main_reference/source/tls.rst b/docs/manuals/en/new_main_reference/source/tls.rst
index 374fb6e6b58..8049a9a41e8 100644
--- a/docs/manuals/en/new_main_reference/source/tls.rst
+++ b/docs/manuals/en/new_main_reference/source/tls.rst
@@ -141,7 +141,10 @@ different Console programs. These directives are defined as follows:
To generate the parameter file, you
may use openssl:
- \begin{verbatim}{commands}{create DH key}
+ \begin{verbatim}
+.. code-block:: sh
+ :caption: create DH key
+
openssl dhparam -out dh1024.pem -5 1024
\end{verbatim}
@@ -180,7 +183,7 @@ Another example can be found at
Bareos Director
~~~~~~~~~~~~~~~
-::
+
{bareosConfigResource}{bareos-dir}{director}{bareos-dir}
Director { # define myself
@@ -198,7 +201,7 @@ Bareos Director
TLS Allowed CN = "administrator@example.com"
}
-::
+
{bareosConfigResource}{bareos-dir}{storage}{File}
Storage {
@@ -214,7 +217,7 @@ Bareos Director
TLS Allowed CN = bareos-sd1.example.com
}
-::
+
{bareosConfigResource}{bareos-dir}{client}{client1-fd}
Client {
@@ -232,7 +235,7 @@ Bareos Director
Bareos Storage Daemon
~~~~~~~~~~~~~~~~~~~~~
-::
+
{bareosConfigResource}{bareos-sd}{storage}{bareos-sd1}
Storage {
@@ -255,7 +258,7 @@ Bareos Storage Daemon
TLS Verify Peer = no
}
-::
+
{bareosConfigResource}{bareos-sd}{director}{bareos-dir}
Director {
@@ -277,7 +280,7 @@ Bareos Storage Daemon
Bareos File Daemon
~~~~~~~~~~~~~~~~~~
-::
+
{bareosConfigResource}{bareos-fd}{client}{myself}
Client {
@@ -295,7 +298,7 @@ Bareos File Daemon
TLS Allowed CN = bareos-sd1.example.com
}
-::
+
{bareosConfigResource}{bareos-fd}{director}{bareos-dir}
Director {
diff --git a/docs/manuals/en/new_main_reference/source/troubleshooting.rst b/docs/manuals/en/new_main_reference/source/troubleshooting.rst
index e6ac6e78af3..720d10ef958 100644
--- a/docs/manuals/en/new_main_reference/source/troubleshooting.rst
+++ b/docs/manuals/en/new_main_reference/source/troubleshooting.rst
@@ -63,7 +63,7 @@ address. An example of an address that is guaranteed not to work:
You can verify how a |bareosFd| resolves a DNS name by the
following command:
-::
+
{bconsole}{Test DNS resolution of the \bareosFd \name{bareos-fd}}
*resolve client=bareos-fd NONEXISTINGHOSTNAME
@@ -241,7 +241,7 @@ to four times concurrently. The change to the Job resource is not
necessary if you want different Jobs to run at the same time, which is
the normal case.
-::
+
{bconfig}{Concurrent Jobs Example}
#
@@ -282,7 +282,7 @@ Media VolWrites: integer out of range
In some situation, you receive an error message similar to this:
-::
+
{bconsole}{}
12-Apr 15:10 bareos-dir JobId 15860: Fatal error: Catalog error updating Media record. sql_update.c:385 update UPDATE Media SET VolJobs=12,VolFiles=10,VolBlocks=155013,VolBytes=10000263168,VolMounts=233,VolErrors=0,VolWrites=2147626019,MaxVolBytes=0,VolStatus='Append',Slot=1,InChanger=1,VolReadTime=0,VolWriteTime=842658562655,LabelType=0,StorageId=3,PoolId=2,VolRetention=144000,VolUseDuration=82800,MaxVolJobs=0,MaxVolFiles=0,Enabled=1,LocationId=0,ScratchPoolId=0,RecyclePoolId=0,RecycleCount=201,Recycle=1,ActionOnPurge=0,MinBlocksize=0,MaxBlocksize=0 WHERE VolumeName='000194L5' failed:
@@ -300,7 +300,7 @@ above.
As a temporary fix, just reset this counter:
-::
+
{bconsole}{Reset the VolWrites counter}
1000 OK: bareos-dir Version: 17.2.5 (14 Feb 2018)
@@ -383,7 +383,7 @@ This command should print:
\footnotesize
-::
+
1:
2:
@@ -416,7 +416,7 @@ This command should print:
\footnotesize
-::
+
Drive content: D:Drive num:F:Slot loaded:Volume Name
D:0:F:2:vol2 or D:Drive num:E
@@ -516,7 +516,7 @@ file and running it as a script:
\footnotesize
-::
+
#!/bin/sh
/usr/lib/bareos/scripts/mtx-changer /dev/sg0 unload 1 /dev/nst0 0
@@ -546,7 +546,7 @@ just after the unload so that the script looks like:
\footnotesize
-::
+
#!/bin/sh
/usr/lib/bareos/scripts/mtx-changer /dev/sg0 unload 1 /dev/nst0 0
@@ -589,7 +589,7 @@ the catalog to select individual files. With this new feature, Bareos
will ask if you want to specify a Regex expression for extracting only a
part of the full backup.
-::
+
Building directory tree for JobId(s) 1,3 ...
There were no files inserted into the tree, so file selection
@@ -626,7 +626,7 @@ such as:
\footnotesize
-::
+
04-Jan 00:33 z217-sd: RestoreFiles.2005-01-04_00.31.04 Error:
block.c:868 Volume data error at 20:0! Short block of 512 bytes on
@@ -642,7 +642,7 @@ or
\footnotesize
-::
+
04-Jan 00:33 z217-sd: RestoreFiles.2005-01-04_00.31.04 Error:
block.c:264 Volume data error at 20:0! Wanted ID: "BB02", got ".".
diff --git a/docs/manuals/en/new_main_reference/source/tutorial.rst b/docs/manuals/en/new_main_reference/source/tutorial.rst
index 53a36d995aa..ff79cebcc58 100644
--- a/docs/manuals/en/new_main_reference/source/tutorial.rst
+++ b/docs/manuals/en/new_main_reference/source/tutorial.rst
@@ -69,7 +69,7 @@ Starting the Daemons
Assuming you have installed the packages, to start the three daemons,
from your installation directory, simply enter:
-::
+
service bareos-dir start
service bareos-sd start
@@ -94,9 +94,12 @@ frequently, however, one runs it on the same machine as the
|bareosDir|. Normally, the Console program will print
something similar to the following:
-::
- {commands}{bconsole}
+
+
+.. code-block:: sh
+ :caption: bconsole
+
bconsole
Connecting to Director bareos:9101
Enter a period to cancel a command.
@@ -106,7 +109,7 @@ The asterisk is the console command prompt.
Type :raw-latex:`\bcommand{help}{}` to see a list of available commands:
-::
+
{bconsole}{help}
*help
@@ -192,7 +195,7 @@ configuration files.
At this point, enter the :raw-latex:`\bcommand{show}{filesets}` and you
should get something similar this:
-::
+
{bconsole}{show filesets}
*show filesets
@@ -233,7 +236,7 @@ your Bareos source directory to a File Volume in your
``path:/var/lib/bareos/storage/`` directory just to show you how easy it
is. Now enter:
-::
+
{bconsole}{status dir}
*status dir
@@ -261,7 +264,7 @@ is scheduled to run.
Now enter:
-::
+
{bconsole}{status client}
*status client
@@ -286,7 +289,7 @@ running.
Finally do the same for your |bareosSd| with:
-::
+
{bconsole}{status storage}
*status storage
@@ -324,7 +327,7 @@ Now, let’s actually run a job with:
\footnotesize
-::
+
run
@@ -338,7 +341,7 @@ you should get the following output:
\footnotesize
-::
+
Automatically selected Catalog: MyCatalog
Using Catalog "MyCatalog"
@@ -361,7 +364,7 @@ get:
\footnotesize
-::
+
Run Backup job
JobName: BackupClient1
@@ -400,7 +403,7 @@ If you wait a few seconds, then enter the command
\TODO{Replace bconsole output by current version of Bareos.}
-::
+
{bconsole}{run}
*messages
@@ -437,7 +440,7 @@ If you don’t see the output immediately, you can keep entering
Instead of typing :raw-latex:`\bcommand{messages}{}` multiple times, you
can also ask bconsole to wait, until a specific job is finished:
-::
+
{bconsole}{wait}
*wait jobid=1
@@ -457,7 +460,7 @@ that you have the following item:
\footnotesize
-::
+
-rw-r----- 1 bareos bareos 39072153 Apr 28 14:30 Full-001
@@ -491,7 +494,7 @@ If you have run the default configuration and run the job as
demonstrated above, you can restore the backed up files in the Console
program by entering:
-::
+
{bconsole}{restore}
*restore all
@@ -524,7 +527,7 @@ did, and you will get the following output:
\footnotesize
-::
+
Automatically selected Client: bareos-fd
The defined FileSet resources are:
@@ -544,7 +547,7 @@ to restore files from the file set.
\footnotesize
-::
+
+-------+-------+----------+------------+---------------------+---------------+
| jobid | level | jobfiles | jobbytes | starttime | volumename |
@@ -593,7 +596,7 @@ To exit this mode, simply enter:
\footnotesize
-::
+
done
@@ -607,7 +610,7 @@ and you will get the following output:
\footnotesize
-::
+
Bootstrap records written to
/home/user/bareos/testbin/working/restore.bsr
@@ -673,7 +676,7 @@ job that looks similar to this:
\footnotesize
-::
+
23-May 15:24 bareos-dir JobId 2: Start Restore Job RestoreFiles.2013-05-23_15.24.01_10
23-May 15:24 bareos-dir JobId 2: Using Device "FileStorage" to read.
@@ -704,9 +707,12 @@ After exiting the Console program, you can examine the files in
small directory tree with all the files. Be sure to clean up at the end
with:
-::
- {commands}{remove restore directory}
+
+
+.. code-block:: sh
+ :caption: remove restore directory
+
rm -rf /tmp/bareos-restore
Quitting the Console Program
@@ -774,7 +780,7 @@ Start the :program:`bconsole` and use the
:raw-latex:`\bcommand{configure}{add client}` command. Address must be a
DNS resolvable name or an IP address.
-::
+
{bconsole}{add a client}
*configure add client name=client2-fd address=192.168.0.2 password=secret
@@ -802,9 +808,12 @@ The
is the required resource needed on the |bareosFd|. You can
copy it to the destination:
-::
- {commands}{Copy the bareos-fd director resource to the new client}
+
+
+.. code-block:: sh
+ :caption: Copy the bareos-fd director resource to the new client
+
scp /etc/bareos/bareos-dir-export/client/client2-fd/bareos-fd.d/director/bareos-dir.conf root@client2.example.com:/etc/bareos/bareos-fd.d/director/
Manual configuration
@@ -813,7 +822,7 @@ Manual configuration
Alternatively you can configure your resources manually. On the
|bareosDir| create the file
-::
+
{bareosConfigResource}{bareos-dir}{client}{client2-fd}
Client {
@@ -824,7 +833,7 @@ Alternatively you can configure your resources manually. On the
Reload or restart your |bareosDir|:
-::
+
{bconsole}{reload the Director configuration}
*reload
@@ -908,7 +917,7 @@ However, normally you will only have one
Anyhow, the resource will look similar to this:
-::
+
{bareosConfigResource}{bareos-fd}{director}{bareos-dir}
Director {
@@ -921,9 +930,12 @@ configuration this resource allows the access for a
|bareosDir| with name :raw-latex:`\name{bareos-dir}` and
password :raw-latex:`\name{secret}` (stored in MD5 format).
-::
- {commands}{restart bareos-fd}
+
+
+.. code-block:: sh
+ :caption: restart bareos-fd
+
service bareos-fd restart
.. _manual-configuration-1:
@@ -937,7 +949,7 @@ your |bareosDir| is also named
:raw-latex:`\name{bareos-dir}`, modify or create the file
:file:`/etc/bareos/bareos-fd.d/director/bareos-dir.conf`:
-::
+
{bareosConfigResource}{bareos-fd}{director}{bareos-dir}
Director {
@@ -955,17 +967,23 @@ If your are not using the
sure that this resource file gets included in your
|bareosFd| configuration. You can verify this by
-::
- {commands}{show how bareos-fd would read the current configuration files}
+
+
+.. code-block:: sh
+ :caption: show how bareos-fd would read the current configuration files
+
bareos-fd -xc
After modifying the file, you have to restart the
|bareosFd|:
-::
- {commands}{restart bareos-fd}
+
+
+.. code-block:: sh
+ :caption: restart bareos-fd
+
service bareos-fd restart
Director: test client, add a job
@@ -986,7 +1004,7 @@ The following example show how to
- Verify the job.
-::
+
{bconsole}{test the client and add a job resource}
*status client=client2-fd
@@ -1069,7 +1087,7 @@ and a number of attributes of each of those Volumes.
When Bareos starts, it ensures that all Pool resource definitions have
been recorded in the catalog. You can verify this by entering:
-::
+
{bconsole}{list pools}
*list pools
diff --git a/docs/manuals/en/new_main_reference/source/update.rst b/docs/manuals/en/new_main_reference/source/update.rst
index bbff4755d56..2e9888bbba4 100644
--- a/docs/manuals/en/new_main_reference/source/update.rst
+++ b/docs/manuals/en/new_main_reference/source/update.rst
@@ -66,9 +66,12 @@ will be automatically adapted by the Bareos packages.
\warning{When using the PostgreSQL backend and updating to Bareos $<$ 14.2.3, it is necessary to manually grant database permissions, normally by using}
-::
- {commands}{}
+
+
+.. code-block:: sh
+ :caption:
+
su - postgres -c /usr/lib/bareos/scripts/grant_bareos_privileges
For details see :ref:`section-dbconfig`.
@@ -104,9 +107,12 @@ PostgreSQL
If your are using PostgreSQL and your PostgreSQL administrator is
:raw-latex:`\user{postgres}` (default), use following commands:
-::
- {commands}{Update PostgreSQL database schema}
+
+
+.. code-block:: sh
+ :caption: Update PostgreSQL database schema
+
su postgres -c /usr/lib/bareos/scripts/update_bareos_tables
su postgres -c /usr/lib/bareos/scripts/grant_bareos_privileges
@@ -126,7 +132,7 @@ parameter connects to the database. If not, you may be required to adapt
your local MySQL configuration file :file:`~/.my.cnf`. It
should look similar to this:
-::
+
{config}{MySQL credentials file .my.cnf}
[client]
@@ -137,9 +143,12 @@ should look similar to this:
If you are able to connect via the :program:`mysql` to the
database, run the following script from the Unix prompt:
-::
- {commands}{Update MySQL database schema}
+
+
+.. code-block:: sh
+ :caption: Update MySQL database schema
+
/usr/lib/bareos/scripts/update_bareos_tables
Currently on MySQL is it not necessary to run
diff --git a/docs/manuals/en/new_main_reference/source/verify.rst b/docs/manuals/en/new_main_reference/source/verify.rst
index 01764e0e805..afd140b107d 100644
--- a/docs/manuals/en/new_main_reference/source/verify.rst
+++ b/docs/manuals/en/new_main_reference/source/verify.rst
@@ -22,7 +22,7 @@ The first step is to set up a **Verify** Job and to run it with:
\footnotesize
-::
+
Level = InitCatalog
@@ -42,7 +42,7 @@ with:
\footnotesize
-::
+
Level = Catalog
@@ -149,7 +149,7 @@ your Verify Job, **MatouVerify** in this example.
\footnotesize
-::
+
The defined Job resources are:
1: MatouVerify
@@ -169,7 +169,7 @@ and ask you:
\footnotesize
-::
+
Run Verify job
JobName: MatouVerify
@@ -193,7 +193,7 @@ Level is by default set to **Catalog** and we want to run an
\footnotesize
-::
+
Parameters to modify:
1: Level
@@ -217,7 +217,7 @@ you should select number 2 to modify the **Level**, and it will display:
\footnotesize
-::
+
Levels:
1: Initialize Catalog
@@ -237,7 +237,7 @@ Choose item 1, and you will see the final display:
\footnotesize
-::
+
Run Verify job
JobName: MatouVerify
@@ -263,7 +263,7 @@ should be found.
To use a previous job, you can add ``jobid=xxx`` option in run command
line. It will run the Verify job against the specified job.
-::
+
*run jobid=1 job=MatouVerify
Run Verify job
@@ -294,7 +294,7 @@ is the email received after doing an update of OpenSSH:
\footnotesize
-::
+
HeadMan: Start Verify JobId 83 Job=RufusVerify.2002-06-25.21:41:05
HeadMan: Verifying against Init JobId 70 run 2002-06-21 18:58:51
@@ -399,7 +399,7 @@ A Verify Configuration Example
\footnotesize
-::
+
Schedule {
Name = "VerifyCycle"
diff --git a/docs/manuals/en/new_main_reference/source/webui.rst b/docs/manuals/en/new_main_reference/source/webui.rst
index 38ff6088a5e..708c2cf0e80 100644
--- a/docs/manuals/en/new_main_reference/source/webui.rst
+++ b/docs/manuals/en/new_main_reference/source/webui.rst
@@ -122,28 +122,40 @@ your package manager.
::
- {commands}{}
+
+.. code-block:: sh
+ :caption:
+
yum install bareos-webui
or
::
- {commands}{}
+
+.. code-block:: sh
+ :caption:
+
dnf install bareos-webui
- SUSE Linux Enterprise Server (SLES), openSUSE
::
- {commands}{}
+
+.. code-block:: sh
+ :caption:
+
zypper install bareos-webui
- Debian, Ubuntu
::
- {commands}{}
+
+.. code-block:: sh
+ :caption:
+
apt-get install bareos-webui
Minimal Configuration
@@ -157,7 +169,10 @@ installed on the same host.
::
- {commands}{}
+
+.. code-block:: sh
+ :caption:
+
setsebool -P httpd_can_network_connect on
For details, see :ref:`section-webui-selinux`.
@@ -248,7 +263,7 @@ the |bareosDir|, you have to copy the profile to the
This is the default profile, giving access to all Bareos resources and
allowing all commands used by the |bareosWebui|:
-::
+
{bareosConfigResource}{bareos-dir}{profile}{webui-admin}
Profile {
@@ -285,9 +300,12 @@ SELinux
To use |bareosDir| on a system with SELinux enabled,
permission must be given to HTTPD to make network connections:
-::
- {commands}{}
+
+
+.. code-block:: sh
+ :caption:
+
setsebool -P httpd_can_network_connect on
Configure your Apache Webserver
@@ -330,7 +348,7 @@ The configuration file
:file:`/etc/bareos-webui/directors.ini` should look similar
to this:
-::
+
{bconfig}{/etc/bareos-webui/directors.ini}
;
@@ -420,7 +438,7 @@ Since
you are able to configure some parameters of the
:raw-latex:`\bareosWebui `to your needs.
-::
+
{bconfig}{/etc/bareos-webui/configuration.ini}
;
@@ -554,7 +572,7 @@ NGINX
If you prefer to use :raw-latex:`\bareosWebui `on Nginx with php5-fpm
instead of Apache, a basic working configuration could look like this:
-::
+
{bconfig}{bareos-webui on nginx}
server {
diff --git a/docs/manuals/en/new_main_reference/source/win32.rst b/docs/manuals/en/new_main_reference/source/win32.rst
index 62aff54f8d3..307c0b4aa12 100644
--- a/docs/manuals/en/new_main_reference/source/win32.rst
+++ b/docs/manuals/en/new_main_reference/source/win32.rst
@@ -202,7 +202,7 @@ any configuration after the installation e.g. as follows:
\footnotesize
-::
+
c:\winbareos.exe /S /CLIENTNAME=hostname-fd /CLIENTPASSWORD="verysecretpassword" /DIRECTORNAME=bareos-dir
@@ -248,7 +248,7 @@ In case of problems, you can enable the creation of log files. For this
you have to use the :program:`bconsole`
:ref:`setdebug ` command:
-::
+
{bconsole}{Enable debug}
*setdebug client=bareos-fd level=200 trace=1
@@ -330,9 +330,12 @@ When doing a directory listing in the commandline (cmd) in Windows, it
shows the filetypes JUNCTION, SYMLINK or SYMLINKD and the target between
the square brackets:
-::
- {commands}{special files}
+
+
+.. code-block:: sh
+ :caption: special files
+
C:\linktest>dir
Volume in drive C has no label.
Volume Serial Number is C8A3-971F
@@ -363,7 +366,7 @@ Volume Mount Point (VMP) is backed up as directory but the content of
the VMP will not be backed up. Also, the Joblog will contain a message
like this:
-::
+
{Warning on Volume Moint Point and OneFS=yes}
C:/linktest/vmp is a different filesystem. Will not descend from C:/linktest into it.
@@ -393,7 +396,7 @@ be greater than the number of volumes added for the volume mount points.
The Job Log will show how many VMPs were found like this:
-::
+
{Volume Mount Points are added automatically to VSS snapshots (if onefs=no)}
Volume Mount Points found: 7, added to snapshotset: 5
@@ -402,7 +405,7 @@ Accordingly, if OneFS is set to yes, we do not need to handle Volume
Mount Points this way. If OneFS is set to yes (default), the joblog will
contain the following information:
-::
+
{Volume Mount Points are ignored on VSS snapshots (if onefs=yes)}
VolumeMountpoints are not processed as onefs = yes.
@@ -440,7 +443,7 @@ automatically excluded from backup.
The backup log shows a short information about the creation of the
exludes like this:
-::
+
{Excludes according to the FilesNotToBackup registry key}
Created 28 wildcard excludes from FilesNotToBackup Registry key
@@ -449,7 +452,7 @@ More details can be found if the filedaemon is run in debug mode inside
of the :file:`bareos-fd.trace` logfile. Each entry and the
resulting wildcard are logged.
-::
+
{translation between registry key FilesNotToBackup and Bareos Exclude FileSet}
client-win-fd: win32.c:465-0 (1) "WER" :
@@ -474,7 +477,7 @@ option :raw-latex:`\configdirective{AutoExclude}` to no.
The JobLog will then show the following informational line:
-::
+
{AutoExclude disabled}
Fileset has autoexclude disabled, ignoring FilesNotToBackup Registry key
@@ -566,7 +569,7 @@ VSS can be turned on by placing an
pair: VSS; Enable
-::
+
Enable VSS = yes
@@ -575,7 +578,7 @@ in your FileSet resource.
The VSS aware File daemon has the letters VSS on the signon line that it
produces when contacted by the console. For example:
-::
+
Tibs-fd Version: 1.37.32 (22 July 2005) VSS Windows XP MVS NT 5.1.2600
@@ -585,7 +588,7 @@ backup. There are two ways of telling if VSS is actually turned on
during a backup. The first is to look at the status output for a job,
e.g.: :raw-latex:`\footnotesize`
-::
+
Running Jobs:
JobId 1 Job NightlySave.2005-07-23_13.25.45 is running.
@@ -607,7 +610,7 @@ The second way to know that the job was backed up with VSS is to look at
the Job Report, which will look something like the following:
:raw-latex:`\footnotesize`
-::
+
23-Jul 13:25 rufus-dir: Start Backup JobId 1, Job=NightlySave.2005-07-23_13.25.45
23-Jul 13:26 rufus-sd: Wrote label to prelabeled Volume "TestVolume001" on device "DDS-4" (/dev/nst0)
@@ -682,9 +685,12 @@ Network TCP Port
If you want to see if the File daemon has properly opened the port and
is listening, you can enter the following command in a shell window:
-::
- {commands}{}
+
+
+.. code-block:: sh
+ :caption:
+
netstat -an | findstr 910[123]
Windows Restore Problems
@@ -717,7 +723,7 @@ Director’s conf file.
In the Options resource: :raw-latex:`\footnotesize`
-::
+
portable = no
@@ -727,7 +733,7 @@ In the Options resource: :raw-latex:`\footnotesize`
In the FileSet resource: :raw-latex:`\footnotesize`
-::
+
enablevss = yes
@@ -829,7 +835,7 @@ E.g. to always start Bareos in debug mode, modify
\footnotesize
-::
+
"C:\Program Files\Bareos\bareos-fd.exe" /service
@@ -839,7 +845,7 @@ to
\footnotesize
-::
+
"C:\Program Files\Bareos\bareos-fd.exe" /service -d200
@@ -858,9 +864,12 @@ port for each instance.
To create two bareos-fd services, you can call the following service
create calls on the commandline on windows as administrator:
-::
- {commands}{}
+
+
+.. code-block:: sh
+ :caption:
+
sc create bareosfd2 binpath="\"C:\Program Files\Bareos\bareos-fd.exe\" /service -c \"C:\ProgramData\Bareos\bareos-fd2.conf\"" depend= "tcpip/afd"
sc create bareosfd3 binpath="\"C:\Program Files\Bareos\bareos-fd.exe\" /service -c \"C:\ProgramData\Bareos\bareos-fd3.conf\"" depend= "tcpip/afd"
@@ -874,16 +883,22 @@ settings.
The services can be started by calling
-::
- {commands}{}
+
+
+.. code-block:: sh
+ :caption:
+
sc start bareosfd2
and
-::
- {commands}{}
+
+
+.. code-block:: sh
+ :caption:
+
sc start bareosfd3
Windows Specific Command Line Options