Skip to main content

Backuppy backs up and restores your data using rsync.

Project description

Build Status Coverage Status Backuppy runs on Python 2.7, 3.5, and 3.6 Latest release Backuppy is released under the MIT license

About

Backuppy backs up and restores your data using rsync, allowing different routes to the same, or different destinations.

The following instructions can be executed in any system Python environment, but you may want to use a virtual environment. Alternatively, some actions can be performed using tox as well, which produces its own virtual environments in .tox/py**.

License

Backuppy is released under the MIT license.

Usage

Requirements

  • Python 2.7+

Installation

In any Python environment, run pip install backuppy.

Command line

$ backuppy --help
usage: backuppy [-h] {backup} ...

Backuppy backs up and restores your data using rsync.

positional arguments:
  {backup}
    backup    Starts a back-up.

optional arguments:
  -h, --help  show this help message and exit

Configuration

Configuration is written in YAML or JSON, and can be stored anywhere as *.yml, *.yaml, or *.json files. An example of the smallest possible configuration file:

source:
  type: path
  configuration:
    path: ./source
target:
  type: path
  configuration:
    path: ./target

To tweak Backuppy’s output:

# An optional human-readable name for this back-up. It will default to the configuration file name.
name: Test
# Whether or not to generate verbose output. Defaults to `false`.
verbose: true

Backuppy supports plugins for back-up source and target locations, as well as notifications.

To configure a local path-based target:

type: path
configuration:
  # The local path to the target directory. If the path is relative, it will be resolved against the location of
  # the configuration file.
  path: ./target

To configure a remote target over SSH:

type: ssh
configuration:
  # The host to connect to.
  host: example.com
  # The SSH port to use. Defaults to 22.
  port: 22
  # The name of the user on the remote system to log in as.
  user: bart
  # The absolute path to the target directory on the remote.
  path: /home/bart/target

The SSH key must have been accepted already, and the host must support Bash.

To specify multiple routes to the same target, such as one over a local network mount, and a fallback over SSH:

target:
  type: first_available
  configuration:
    targets:
      - type: path
        configuration:
          path: ./target
      - type: ssh
        configuration:
          host: example.com
          user: bart
          path: /home/bart/target

To configure user-facing notifications:

# An optional list of zero or more notification methods. Message types are:
# - "state": unimportant, mass-generated, or debugging output which may be ignored.
# - "inform": informative messages, such as those marking the start of an action.
# - "confirm": confirmation messages, such as those marking the successful completion of an action.
# - "alert": important messages that warrant someone's attention, such as in case of errors.
notifications: []

To display notifications to stdout and stderr (terminal output):

notifications:
  - type: stdio

To display notifications using notify-send:

notifications:
  - type: notify-send

To process notifications through custom CLI commands:

notifications:
  - type: command
    # Commands are specified as CLI arguments. `fallback` is required if any of the others are missing.
    configuration:
      state:
        - echo
        - "{message}"
      inform:
        - echo
        - "{message}"
      confirm:
        - echo
        - "{message}"
      alert:
        - echo
        - "{message}"
      fallback:
        - echo
        - "{message}"

To append notifications to files:

notifications:
  - type: file
    # Paths must be absolute. `fallback` is required if any of the others are missing.
    configuration:
      state:
        - /var/log/backuppy
      inform:
        - /var/log/backuppy
      confirm:
        - /var/log/backuppy
      alert:
        - /var/log/backuppy
      fallback:
        - /var/log/backuppy

Development

Requirements

  • The generic requirements documented earlier.

  • Bash (you’re all good if which bash outputs a path in your terminal)

Installation

Run git clone https://github.com/bartfeenstra/backuppy.git.

If you wish to contribute code changes, you may want to fork this project first, and clone your own forked repository instead.

Building

In any Python environment, run ./bin/build-dev.

With tox, run tox --develop --notest.

Testing

In any Python environment, run ./bin/test.

With tox, run tox --develop

Fixing problems automatically

In any Python environment, run ./bin/fix.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

backuppy-0.2.0.tar.gz (15.4 kB view details)

Uploaded Source

Built Distribution

backuppy-0.2.0-py2.py3-none-any.whl (24.9 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file backuppy-0.2.0.tar.gz.

File metadata

  • Download URL: backuppy-0.2.0.tar.gz
  • Upload date:
  • Size: 15.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for backuppy-0.2.0.tar.gz
Algorithm Hash digest
SHA256 68d685536642fec1b729d8d1740e227ae3e7adaab92c3036cdb87082cfca88aa
MD5 0dc86db16fd598e8511da554ab04d737
BLAKE2b-256 38dc3b88fc91e6de0d4fcc4eee281063dcad4c85fe3c7ff1dc926e2204c98c46

See more details on using hashes here.

File details

Details for the file backuppy-0.2.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for backuppy-0.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 26d85d213bace75975e0b2219ab631bc7d6ea6e45217248dc580e0f5e65a4953
MD5 d5bb35267f2ab533c560fc3f9f667646
BLAKE2b-256 51747b972283e28d2a1808c22a3f794a2989ddcb2f6cb1584017cf432e970d31

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page