Skip to content

Commit

Permalink
tweak documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Ken Kundert authored and Ken Kundert committed Dec 4, 2022
1 parent d17fdea commit 6834b86
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 11 deletions.
2 changes: 2 additions & 0 deletions doc/accessories.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
Accessories
===========

.. _borg space:

Borg-Space
----------

Expand Down
16 changes: 8 additions & 8 deletions doc/commands.rst
Original file line number Diff line number Diff line change
Expand Up @@ -260,10 +260,10 @@ Delete one or more archives currently contained in the repository:
If no archive is specified, the latest is deleted.

The disk space associated with deleted archives is not reclaimed until
the :ref:`compact <manage_compact_cmd>` command is run. You can specify that
a compaction is performed as part of the deletion by setting
:ref:`compact_after_delete`. If set, the ``--fast`` flag causes the compaction
to be skipped. If not set, the ``--fast`` flag has no effect.
the :ref:`compact <compact>` command is run. You can specify that a compaction
is performed as part of the deletion by setting :ref:`compact_after_delete`. If
set, the ``--fast`` flag causes the compaction to be skipped. If not set, the
``--fast`` flag has no effect.

Specifying ``--repo`` results in the entire repository being deleted.
Unlike with *borg* itself, no warning is issued and no additional conformation
Expand Down Expand Up @@ -653,10 +653,10 @@ specified to use :ref:`prune <prune>`:
The *prune* command deletes archives that are no longer needed as determined by
the prune rules. However, the disk space is not reclaimed until the
:ref:`compact <manage_compact_cmd>` command is run. You can specify that
a compaction is performed as part of the prune by setting
:ref:`compact_after_delete`. If set, the ``--fast`` flag causes the compaction
to be skipped. If not set, the ``--fast`` flag has no effect.
:ref:`compact <compact>` command is run. You can specify that a compaction is
performed as part of the prune by setting :ref:`compact_after_delete`. If set,
the ``--fast`` flag causes the compaction to be skipped. If not set, the
``--fast`` flag has no effect.

.. _restore:

Expand Down
16 changes: 13 additions & 3 deletions doc/configuring.rst
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,11 @@ the following:
# commands to be run before and after backups (run from working directory)
run_before_first_backup = """
# remove the detritus before backing up
./clean-home >& {log_dir}/clean-home.log
~/bin/clean-home >& {log_dir}/clean-home.log
"""
run_after_last_backup = """
# rebuild my man pages, they were deleted by clean-home
./rebuild-manpages > /dev/null
# rebuild my documentation, it was deleted by clean-home
~/bin/rebuild-documentation > /dev/null
"""
# if set, this file or these files must exist or backups will quit with an error
Expand Down Expand Up @@ -1023,6 +1023,16 @@ configuration in a composite configuration with the intent that the commands
will be run only once regardless whether the configurations are run individually
or as a group.

For example, the following runs :ref:`borg space` after each back-up to record
the size history of your repository:

.. code-block:: python
run_after_backup = [
'borg-space -r -m "Repository is now {{size:.2}}." {config_name}'
]
.. _run_before_backup:
.. _run_before_first_backup:

Expand Down

0 comments on commit 6834b86

Please sign in to comment.