Skip to content

Commit

Permalink
Correct grammar in Docs and ReadMe (#448)
Browse files Browse the repository at this point in the history
* corrected grammar in docs

* fix typo
  • Loading branch information
millerthegorilla committed Jun 4, 2022
1 parent 3468572 commit 3cc623f
Show file tree
Hide file tree
Showing 10 changed files with 113 additions and 102 deletions.
20 changes: 10 additions & 10 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ This Django application provides management commands to help backup and
restore your project database and media files with various storages such as
Amazon S3, Dropbox, local file storage or any Django storage.

It is made for:
It is made to:

- Ensure your backup with GPG signature and encryption
- Allow you to secure your backup with GPG signature and encryption
- Archive with compression
- Deal easily with remote archiving
- Great to keep your development database up to date.
- Use Crontab or Celery to setup automated backups.
- Keep your development database up to date
- Use Crontab or Celery to setup automated backups

Docs
====
Expand All @@ -35,7 +35,7 @@ See our official documentation at `Read The Docs`_.
Why use DBBackup
================

This software doesn't reinvent the wheel, in few words it is a pipe between
This software doesn't reinvent the wheel, in a few words it is a pipe between
your Django project and your backup storage. It tries to use the traditional dump &
restore mechanisms, apply compression and/or encryption and use the storage system you desire.

Expand Down Expand Up @@ -149,21 +149,21 @@ Restore media files from storage backup to your media storage. ::
Tests
=====

Tests are stored in `dbbackup.tests` and for run them you must launch:
Tests are stored in `dbbackup.tests` and to run them you must launch:

::

python runtests.py

In fact, ``runtests.py`` acts as a ``manage.py`` file and all Django command
In fact, ``runtests.py`` acts as a ``manage.py`` file and all Django commands
are available. So you could launch:

::

python runtests.py shell

For get a Python shell configured with the test project. Also all test
command options are available and usable for run only some chosen tests.
to get a Python shell configured with the test project. Also all test
command options are available and usable to run only a selection of tests.
See `Django test command documentation`_ for more information about it.

.. _`Django test command documentation`: https://docs.djangoproject.com/en/stable/topics/testing/overview/#running-tests
Expand All @@ -172,7 +172,7 @@ There are even functional tests: ::

./functional.sh

See documentation for details about
See documentation for details.

To run the tests across all supported versions of Django and Python, you
can use Tox. Firstly install Tox:
Expand Down
6 changes: 3 additions & 3 deletions docs/commands.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
Commands
========

The primary usage of DBBackup is made with command line tools. By default,
The primary usage of DBBackup is with command line tools. By default,
commands will create backups and upload to your defined storage or download
and restore the latest.
and restore the latest backup.

Commands provide arguments for compress/uncompress and encrypt/decrypt.
Arguments can be passed to commands to compress/uncompress and encrypt/decrypt.

dbbackup
========
Expand Down
26 changes: 19 additions & 7 deletions docs/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ Default: ``tempfile.gettempdir()``
DBBACKUP_TMP_FILE_MAX_SIZE
~~~~~~~~~~~~~~~~~~~~~~~~~~

Maximum size in bytes for file handling in memory before write a temporary
file in ``DBBACKUP_TMP_DIR``.
Maximum size in bytes for file handling in memory before a temporary
file is written in ``DBBACKUP_TMP_DIR``.

Default: ``10*1024*1024``

Expand All @@ -32,7 +32,7 @@ DBBACKUP_CLEANUP_KEEP and DBBACKUP_CLEANUP_KEEP_MEDIA
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

When issuing ``dbbackup`` and ``mediabackup`` with ``--clean`` option, the
number of old backup files are looked for and removed.
number of old backup files that are looked for and removed.

Default: ``10`` (backups)

Expand All @@ -57,13 +57,15 @@ characters, ``'_'``, ``'-'`` or ``'%'``.

Default: ``'%Y-%m-%d-%H%M%S'``


DBBACKUP_HOSTNAME
~~~~~~~~~~~~~~~~~

Used to identify backup by server name in their file name..
Used to identify a backup by a server name in their file name..

Default: ``socket.gethostname()``


DBBACKUP_FILENAME_TEMPLATE
~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand All @@ -84,15 +86,17 @@ to prefix your backups differently based on when you want them to expire.

``{datetime}`` is rendered with ``DBBACKUP_DATE_FORMAT``.


DBBACKUP_MEDIA_FILENAME_TEMPLATE
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Same as ``DBBACKUP_FILENAME_TEMPLATE`` but for media files backups.


Encrypting your backups
-----------------------

Considering that you might be putting secured data on external servers and
Considering that you might be putting secure data on external servers and
perhaps untrusted servers where it gets forgotten over time, it's always a
good idea to encrypt backups.

Expand All @@ -116,24 +120,27 @@ Requirements:

- Install the python package python-gnupg:
``pip install python-gnupg``.
- You need GPG key. (`GPG manual`)
- You need a GPG key. (`GPG manual`)
- Set the setting ``DBBACKUP_GPG_RECIPIENT`` to the name of the GPG key.

.. _`GPG manual`: https://www.gnupg.org/gph/en/manual/c14.html


DBBACKUP_GPG_ALWAYS_TRUST
~~~~~~~~~~~~~~~~~~~~~~~~~

The encryption of the backup file fails if GPG does not trust the public
encryption key. The solution is to set the option 'trust-model' to 'always'.
By default this value is ``False``. Set this to ``True`` to enable this option.


DBBACKUP_GPG_RECIPIENT
~~~~~~~~~~~~~~~~~~~~~~

The name of the key that is used for encryption. This setting is only used
when making a backup with the ``--encrypt`` or ``--decrypt`` option.


Email configuration
-------------------

Expand All @@ -145,6 +152,7 @@ exception is received.

Default: ``True``


DBBACKUP_SERVER_EMAIL
~~~~~~~~~~~~~~~~~~~~~

Expand All @@ -153,6 +161,7 @@ The email address that error messages come from, such as those sent to

Default: ``django.conf.settings.SERVER_EMAIL``


DBBACKUP_ADMINS
~~~~~~~~~~~~~~~

Expand All @@ -165,7 +174,9 @@ Default: ``django.conf.settings.ADMINS``

.. warning::

``DBBACKUP_FAILURE_RECIPIENTS`` was used before and is deprecated
``DBBACKUP_FAILURE_RECIPIENTS`` was used before and is now deprecated



DBBACKUP_EMAIL_SUBJECT_PREFIX
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand All @@ -181,6 +192,7 @@ Database configuration
By default, DBBackup uses parameters from ``settings.DATABASES`` but you can
make an independent configuration, see `Database settings`_


Storage configuration
---------------------

Expand Down
30 changes: 14 additions & 16 deletions docs/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ issue if:
Make a patch
------------

We use `GitHub pull requests`_ for manage all patches. For a better handling
We use `GitHub pull requests`_ to manage all patches. For a better handling
of requests we advise you to:

#. Fork the project and make a new branch
#. Make your changes with tests if possible and documentation if needed
#. Push changes to your fork repository and test it with Travis
#. If succeed, open a pull request
#. Upset us until we give you an answer
#. If it succeeds, open a pull request
#. Bother us until we give you an answer

.. note::

Expand All @@ -41,7 +41,7 @@ of requests we advise you to:
Test environment
----------------

We provides tools for helps developers to quickly test and dev on DBBackup.
We provides tools to help developers to quickly test and develop DBBackup.
There are 2 majors scripts:

* ``runtests.py``: Unit tests launcher and equivalent of ``manage.py`` in
Expand All @@ -54,12 +54,12 @@ There are 2 majors scripts:
``runtests.py``
~~~~~~~~~~~~~~~

You can test code in local machine with the ``runtests.py`` script: ::
You can test code on your local machine with the ``runtests.py`` script: ::

python runtests.py

But if argument are provided, it acts as ``manage.py`` so you can simply
launch other command to test deeply, example: ::
launch some other command to test deeply, example: ::

# Enter in Python shell
python runtests.py shell
Expand All @@ -73,10 +73,11 @@ All tests are stored in ``dbbackup.tests``.
``functional.sh``
~~~~~~~~~~~~~~~~~

It tests at the higher level if backup/restore mechanism is alright. It
It tests at a higher level if backup/restore mechanism is alright. It
becomes powerful because of the configuration you can give to it. See the next
chapter for explanation about it.


Configuration
~~~~~~~~~~~~~

Expand All @@ -90,7 +91,7 @@ Databank-Engine to use. See in django.db.backends for default backends.

**DB_NAME** - Default: ``:memory:``

Database name. Should be set correctly if an other db is used than sqlite3
Database name. Should be set correctly if a db other than sqlite3 is used.

**DB_USER** - Default: ``None``

Expand All @@ -104,9 +105,6 @@ DB Password

DB Host

Why is this more complicated than the earlier solution?
For mongodb tests dj-database-url had no ENGINE defined.


**MEDIA_ROOT** - Default= ``tempfile.mkdtemp()``

Expand All @@ -118,18 +116,18 @@ Storage used for backups

**STORAGE_OPTIONS**

Options for instantiate the chosen storage. It must be in format
``"key1=foo,key2=bar"`` and will be convert into a ``dict``.
Options for instantiating the chosen storage. It must be formatted as
``"key1=foo,key2=bar"`` and will be converted into a ``dict``.

Online CI
---------

We use `Travis`_ for tests Dbbackup with a matrix of components' version: Several version of Django and several versions of Python including 2, 3 and PyPy.
We use `Travis`_ which tests Dbbackup with a matrix of components' versions: Several versions of Django and several versions of Python including 2, 3 and PyPy.

.. image:: https://api.travis-ci.org/jazzband/django-dbbackup.svg
:target: https://travis-ci.org/jazzband/django-dbbackup

Code coverage is ensured with `Coveralls`_ and has not yet minimum coverage limit.
Code coverage is ensured with `Coveralls`_ and the project has not yet reached a minimum coverage limit.

.. image:: https://coveralls.io/repos/jazzband/django-dbbackup/badge.svg?branch=master&service=github
:target: https://coveralls.io/github/jazzband/django-dbbackup?branch=master
Expand All @@ -142,4 +140,4 @@ Code health is checked with `Landscape`_

.. _Travis: https://travis-ci.org/jazzband/django-dbbackup
.. _Coveralls: https://coveralls.io/github/jazzband/django-dbbackup
.. _`Landscape`: https://landscape.io/github/jazzband/django-dbbackup/
.. _Landscape: https://landscape.io/github/jazzband/django-dbbackup/
30 changes: 15 additions & 15 deletions docs/databases.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ The following databases are supported by this application:
- MySQL
- PostgreSQL
- MongoDB
- And the ones you will implement
- ...and any other that you might implement

By default, DBBackup will try to use your database settings in ``DATABASES``
for handle database, but some databases require custom options so you could
want to use different parameters for backup. That's why we included a
``DBBACKUP_CONNECTORS`` setting; it acts like the ``DATABASES`` one: ::
to handle the database, but some databases require custom options so you might
want to use different parameters for backups. That's why we included a
``DBBACKUP_CONNECTORS`` setting; it follows the form of the django ``DATABASES`` setting: ::

DBBACKUP_CONNECTORS = {
'default': {
Expand Down Expand Up @@ -44,13 +44,13 @@ Absolute path to a connector class by default is:
- :class:`dbbackup.db.postgresql.PgDumpGisConnector` for ``django.contrib.gis.db.backends.postgis``
- :class:`dbbackup.db.mongodb.MongoDumpConnector` for ``django_mongodb_engine``

All supported built-in connectors are listed below.
All supported built-in connectors are described in more detail below.

EXCLUDE
~~~~~~~

Tables to exclude from backup as list. This option can be unavailable for
connectors making snapshots.
Tables to exclude from backup as list. This option may be unavailable for
connectors when making snapshots.

EXTENSION
~~~~~~~~~
Expand All @@ -60,7 +60,7 @@ Extension of backup file name, default ``'dump'``.
Command connectors
------------------

Some connectors use command line tools as dump engine, ``mysqldump`` for
Some connectors use a command line tool as a dump engine, ``mysqldump`` for
example. These kinds of tools have common attributes:

DUMP_CMD
Expand All @@ -75,19 +75,19 @@ of :class:`dbbackup.db.base.BaseCommandDBConnector`)
RESTORE_CMD
~~~~~~~~~~~

Same as ``DUMP_CMD`` but for restoring action.
Same as ``DUMP_CMD`` but used when restoring.

DUMP_PREFIX and RESTORE_PREFIX
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

String to include as prefix of dump or restore command. It will be add with
a space between launched command and its prefix.
String to include as prefix of dump or restore command. It will be added with
a space between the launched command and its prefix.

DUMP_SUFFIX and RESTORE_PREFIX
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

String to include as suffix of dump or restore command. It will be add with
a space between launched command and its suffix.
String to include as suffix of dump or restore command. It will be added with
a space between the launched command and its suffix.

ENV, DUMP_ENV and RESTORE_ENV
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -136,7 +136,7 @@ first one uses ``pg_dump`` and ``pqsl`` for its job, creating RAW SQL files.

The second uses ``pg_restore`` with binary dump files.

They can also use ``psql`` for launch administration command.
They can also use ``psql`` for launching administration command.

SINGLE_TRANSACTION
~~~~~~~~~~~~~~~~~~
Expand All @@ -163,7 +163,7 @@ PostGIS
-------

Set in :class:`dbbackup.db.postgresql.PgDumpGisConnector`, it does the same as
PostgreSQL but launchs ``CREATE EXTENSION IF NOT EXISTS postgis;`` before
PostgreSQL but launches ``CREATE EXTENSION IF NOT EXISTS postgis;`` before
restore database.

PSQL_CMD
Expand Down
Loading

0 comments on commit 3cc623f

Please sign in to comment.