Skip to content

Commit

Permalink
Fix some errors in the documenation.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ken Kundert authored and Ken Kundert committed Oct 5, 2019
1 parent 8b63dbb commit 10422cb
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 27 deletions.
26 changes: 14 additions & 12 deletions doc/commands.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Check the integrity of the repository and its archives.
Configs
-------

List the available backup configurations. Each configuration will correspond to
List the available backup configurations. Each configuration corresponds to
a settings file in your configuration directory (~/.config/emborg). Settings
common to all your configurations should be placed in ~/.config/emborg/settings.
You can see available configs using::
Expand All @@ -111,8 +111,9 @@ only the changes from the already existing archives are saved.
emborg create

Before creating your first archive, you must use the *init* command to
initialize your repository. *create* is the default command, so you can create
an archive with simply::
initialize your repository.

*create* is the default command, so you can create an archive with simply::

emborg

Expand Down Expand Up @@ -172,10 +173,10 @@ You extract a file or directory from an archive using::
emborg extract home/ken/bin

Use manifest to determine what path you should specify to identify the desired
file or directory. You can specify more than one path. They will be paths that
are relative to /, thus the paths should look like absolute paths with the
leading slash removed. The paths may point to directories, in which case the
entire directory is extracted. It may also be a glob pattern.
file or directory. You can specify more than one path. Usually, they will be
paths that are relative to ``/``, thus the paths should look like absolute paths
with the leading slash removed. The paths may point to directories, in which
case the entire directory is extracted. It may also be a glob pattern.

If you do not specify an archive or date, the most recent archive is used. You
can extract the version of a file or directory that existed on a particular date
Expand Down Expand Up @@ -299,19 +300,20 @@ would a normal read-only filesystem.
In this example, *backups* acts as a mount point. If it exists, it must be
a directory. If it does not exist, it is created.

If you do not specify an archive, as above, all archives are mounted.
If you do not specify an archive, as above, the most recently created archive
is mounted.

You can explicitly specify an archive::

emborg mount --archive continuum-2015-04-01T12:19:58 backups

Or you can mount the files that existed on a particular date using::
You can mount the files that existed on a particular date using::

emborg mount --date 2015-04-01 backups

Or you can mount the latest available archive::
Or, you can mount all the available archives::

emborg mount --latest backups
emborg mount --all backups

You will need to un-mount the repository or archive when you are done with it.
To do so, use the *umount* command.
Expand Down Expand Up @@ -359,7 +361,7 @@ This command displays all the settings that affect a backup configuration.
emborg settings

Add '-a' option to list out all available settings and their descriptions rather
than the specified settings and their values.
than the settings actually specified and their values.


.. _umount:
Expand Down
10 changes: 5 additions & 5 deletions doc/configuring.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ Configuring
===========

Settings file go in ~/.config/emborg. You need a shared settings file and then
one file for each repository you need. Except for *configurations* and
*default_configuration* any setting may be place in the shared file or the
repository specific file. If a setting shows in both files, the version on the
configuration specific file dominates.
one file for each backup configuration you need. Except for *configurations*
and *default_configuration* any setting may be place in the shared file or the
repository specific file. If a setting is found in both files, the version in
the configuration specific file dominates.

You can get a complete list of available configuration settings by running::

Expand Down Expand Up @@ -61,7 +61,7 @@ the Avendesora account name of the key to *avendesora_account*.

This example assumes that there is one backup configuration per repository. You
can instead have all of your configurations share a single repository replacing
*repository* and *archive* with::
*repository* and adding *prefix* like so::

repository = 'archives:/mnt/backups/{host_name}/{user_name}'
prefix = '{config_name}-'
Expand Down
6 changes: 2 additions & 4 deletions doc/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Here is the contents of the settings file: /root/.config/emborg/settings::

# repository settings
repository = 'backups:/mnt/backups/{host_name}-{user_name}-{config_name}'
archive = '{config_name}-{{now:%Y%m%d}}'
archive = '{prefix}{{now:%Y%m%d}}'
prefix = '{config_name}-'
compression = 'lz4'

Expand Down Expand Up @@ -145,7 +145,6 @@ Here is the contents of the *home* configuration file: ~/.config/emborg/home::
~/**/.~
'''.split()

exclude_if_present = '.nobackup'
run_before_backup = '(cd ~/src; ./clean)'

# prune settings
Expand All @@ -162,7 +161,7 @@ Since you are running this configuration interactively, *backups* should be
configured to use a private key and that key should be preloaded into your SSH
agent.

This configuration keeps the passphrase is kept in `Avendesora
This passphrase for this configuration is kept in `Avendesora
<https://avendesora.readthedocs.io>`_, and the encryption method is *keyfile*.
As such, it is critical that you extract the keyfile from *Borg* and copy it and
your *Avendesora* files to a safe place so that both the keyfile and passphrase
Expand Down Expand Up @@ -208,7 +207,6 @@ And finally, here is the contents of the *cache* configuration file:
~/**/.*.swo
~/**/.~
'''.split()
exclude_if_present = '.nobackup'

# prune settings
keep_within = '1d'
Expand Down
13 changes: 7 additions & 6 deletions emborg/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -882,20 +882,21 @@ class MountCommand(Command):
current directory, it must be a directory. If it does not exist, it is
created.
If you do not specify an archive or date, all archives are mounted.
You can mount the latest archive using:
emborg mount --latest backups
If you do not specify an archive or date, the most recently created
archive is mounted.
You can mount an archive that existed on a particular date using:
emborg mount --date 2015-04-01 backups
Or, you can mount a particular archive using:
You can mount a particular archive using:
emborg mount --archive kundert-2018-12-05T12:54:26 backups
Or, you can mount all available archives using:
emborg mount --all backups
You should use `emborg umount` when you are done.
""").strip()
REQUIRES_EXCLUSIVITY = True
Expand Down

0 comments on commit 10422cb

Please sign in to comment.