Add HTML pages

This commit is contained in:
Eric Torres
2019-04-19 07:57:40 -07:00
parent 349b55de3a
commit 1428e384f6
34 changed files with 16170 additions and 0 deletions

55
doc/source/conf.py Normal file
View File

@@ -0,0 +1,55 @@
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup --------------------------------------------------------------
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
import os
import sys
sys.path.insert(0, os.path.abspath("../.."))
# -- Project information -----------------------------------------------------
project = "rbackup"
copyright = "2019, Eric Torres"
author = "Eric Torres"
# The full version, including alpha/beta/rc tags
release = "0.4"
# -- General configuration ---------------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ["sphinx.ext.autodoc"]
# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = []
# -- Options for HTML output -------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = "alabaster"
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ["_static"]

119
doc/source/index.rst Normal file
View File

@@ -0,0 +1,119 @@
.. rbackup documentation master file, created by
sphinx-quickstart on Sun Apr 14 13:06:20 2019.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
rbackup - A simple rsync backup utility
=======================================
.. toctree::
:maxdepth: 2
:caption: Contents:
rbackup
rbackup.plugins
rbackup.struct
----------------------
Principle of Operation
----------------------
Each time the backup script for rbackup is run, it creates a new snapshot and runs a backup of included paths using rsync to that new snapshot. This ensures that backup data does not overwrite pre-existing data. Paths are included by including paths relative to ``/`` in files suffixed with ``-include.conf`` in ``/etc/rbackup``.
The backup script follows this procedure:
1. Load specified repository and existing snapshots if any.
2. If specified repository is new, then set up metadata.
3. Create a new snapshot in the specified repository. If a name is specified, give the snapshot said name. If a snapshot with said name already exists, then overwrite that snapshot instead.
4. Aggregate all desired and excluded paths into two separate temporary files. Pass both files and default arguments to rsync.
5. Run the rsync process and wait until process is finished
6. If there is an existing symlink pointing to a snapshot in the repository, then delete it.
7. Create a symlink in the repository root directory pointing to the new snapshot.
.. important:: Repositories are not network-aware. rbackup does not have provisions to handle remote hosts.
-----------
The Scripts
-----------
**backup**
*Options*
-c, --use-checksums use rsync's checksum feature to detect file changes
-d, --dry-run make this backup a dry run
--debug show debug messages
-n, --name name to give to the backup snapshot
-s, --run-post-sync run sync syscall after backup
-v, --verbose show info messages
*Usage*
::
backup [options] [repository path]
On each run of this script, a new snapshot is made and any unchanged
files are hardlinked into the new snapshot.
**restore**
*Options*
*TODO insert options here*
**snapshot-manager**
*Usage*
*TODO insert more stuff here*
-------------
Configuration
-------------
The directory for configuration files is /etc/rbackup.
Paths to include in the backup are included in ``*-include.conf`` files located in the configuration directory. Likewise, paths to exclude from the backup are in ``*-exclude.conf`` files in the same directory. The backup script automatically looks for and includes paths written in these files. Each path, whether include or exclude should be relative to the root directory (/).
For example, if the /etc/NetworkManager directory was desired for backup, one would write etc/NetworkManager in a file that could be named 'etc-include.conf' in /etc/rbackup. Users can separate different paths into multiple include files for organization.
------------
Installation
------------
To install system-wide:
::
$ python setup.py build
# python setup.py install --prefix="/usr" --optimize=1 --skip-build
To install in a specified directory/package
::
$ python setup.py build
$ python setup.py install --prefix="/usr" --root="targetdir" --optimize=1 --skip-build
-----
Usage
-----
TODO insert later
-------
License
-------
This project is licensed under MIT. See LICENSE for more details.
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`

View File

@@ -0,0 +1,21 @@
rbackup.plugins package
=======================
Submodules
----------
rbackup.plugins.packagemanager module
-------------------------------------
.. automodule:: rbackup.plugins.packagemanager
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: rbackup.plugins
:members:
:undoc-members:
:show-inheritance:

38
doc/source/rbackup.rst Normal file
View File

@@ -0,0 +1,38 @@
rbackup package
===============
Subpackages
-----------
.. toctree::
rbackup.plugins
rbackup.struct
Submodules
----------
rbackup.config module
---------------------
.. automodule:: rbackup.config
:members:
:undoc-members:
:show-inheritance:
rbackup.rsync module
--------------------
.. automodule:: rbackup.rsync
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: rbackup
:members:
:undoc-members:
:show-inheritance:

View File

@@ -0,0 +1,38 @@
rbackup.struct package
======================
Submodules
----------
rbackup.struct.hierarchy module
-------------------------------
.. automodule:: rbackup.struct.hierarchy
:members:
:undoc-members:
:show-inheritance:
rbackup.struct.repository module
--------------------------------
.. automodule:: rbackup.struct.repository
:members:
:undoc-members:
:show-inheritance:
rbackup.struct.snapshot module
------------------------------
.. automodule:: rbackup.struct.snapshot
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: rbackup.struct
:members:
:undoc-members:
:show-inheritance: