Skip to main content
Build Status Coverage Status Backuppy runs on Python 2.7, 3.5, and 3.6, and on PyPy 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.

Documentation

Extended API documentation is available at Read the Docs.

Usage

Requirements

  • Python 2.7+

Installation

In any Python environment, run pip install backuppy.

Command line

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

Backuppy backs up and restores your data using rsync.

positional arguments:
  {backup,restore,init}
    backup              Starts a back-up.
    restore             Restores a back-up.
    init                Initializes a new back-up configuration.

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 create a new back-up configuration without writing code, run backuppy init and follow the interactive wizard.

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
# Python logging configuration. This is specific to the Python version you are using. Defaults to `null` for no logging.
# See https://docs.python.org/3.6/library/logging.config.html#logging-config-dictschema.
logging:
  version: 1
  # ...additional logger and handler configuration.

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

Viewing documentation

In any Python environment, run ./bin/build-docs, and open ./docs-build/index.html.

Fixing problems automatically

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

Metadata

Release files for backuppy 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for backuppy 0.4.0
File Size Uploaded Provenance Actions
backuppy-0.4.0.tar.gz 26.9 kB Without provenance Details for backuppy-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for backuppy 0.4.0
File Interpreter ABI Platform Actions
backuppy-0.4.0-py2.py3-none-any.whl Python 2, Python 3 none any Details for backuppy-0.4.0-py2.py3-none-any.whl

Total release size: 63.8 kB

Release files / backuppy-0.4.0.tar.gz

Download URL backuppy-0.4.0.tar.gz
Size 26.9 kB
Tags Source
SHA-256 checksum
How to use checksums
f2796190852a21bd731fb1bef7071d393467e8d5db270ba5d8661df02d200152
BLAKE2b-256 checksum
How to use checksums
f65ca15a9a48af1ca96eef521ef7daa4562d463510152c9dff66aeb37fd98f72
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / backuppy-0.4.0-py2.py3-none-any.whl

Download URL backuppy-0.4.0-py2.py3-none-any.whl
Size 36.9 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
86d0fcdf9890dfb1d8e671538d0c1fe627ad2d380df887e38e950cd7b9c8a1cf
BLAKE2b-256 checksum
How to use checksums
78802c48b45f5a241d63845aa42633cfb3c8817818dd836aebd43fd64f083df2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for backuppy 0.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page