Skip to content
This repository has been archived by the owner on Oct 21, 2022. It is now read-only.

Simple backup that chops up a directory into smaller chunks for cold storage on blu-ray.

License

Notifications You must be signed in to change notification settings

markus-seidl/pybutcherbackup

Repository files navigation

PyButcherBackup

Build Status Quality Gate Status Reliability Rating Coverage Bugs

Simple backup that chops up a directory (including compression and encryption) into smaller chunks. The main use case is backing up to a smaller medium (blu-ray) for cold storage.

Additionally the techniques used to encrypt and store the data should be "simple". Meaning that, if the software is lost in the future (no one knows the future), the user is able to restore the files using bash and common apps. Currently only bash, tar, bz2 and gnupg (if encrypted) is needed. Sqlite is optional.

Workflow / Concept

Works in the following steps

  • Ingests the whole directory and builds up a database of all files with sha256/512 hashsums
  • Builds a diff against the supplied database (maybe from the last backup?)
  • Creates single disc backups performing the following steps
    • Loop
      • Gather around 1G of source data
        • If source file is larger than 1G?
          • Binary split the file in 1G chunks
      • Compress this
      • Encrypt this
      • Store the information what is stored where in the database
    • Until a full blu-ray is reached
      • Burn all archives and the current state of the DB to disk
  • Continue until all differences have been stored

Installation

From source

git clone https://github.com/markus-seidl/pybutcherbackup.git
pip install -r requirements
python main.py #see usage below#

Using docker

docker run -it -v <path-to-src>:/src -v <path-to-dest>:/dest augunrik/pybutcherbackup backup /src file:///dest

Example

Backup

python main.py backup #src# #dest# --passphrase "password"

Restore

python main.py restore #src# #dest# --passphrase "password"

Restore by hand

PyButcherBackup is designed so, that you could restore every backup with a bit of bash magic and standard unix tools (tar, gpg, cat, gzip/bzip, sqlite).

Documentation

Destination Types

dir://

Stores everything inside the given directory. Creates subdirectories named 00001, 00002, etc. for each medium size.

This backup type allows hooks after all internal tasks have been run. See useages of hookhelper.py#execute_hook

bluray://

TODO

tape://

TODO

About

Simple backup that chops up a directory into smaller chunks for cold storage on blu-ray.

Resources

License

Stars

Watchers

Forks

Packages

No packages published