Skip to main content

backup tool with plugins

Project description

Build Status Coverage Status Pypi Version

A small tool to run backups in different ways. Its pluggable.

Install

pip install dothebackup

Usage

Usage: dothebackup [OPTIONS] CONFIGFILE

  Commandline interface.

Options:
  --test     Only prints the created commands that would be used.
  --version  Show the version and exit.
  --help     Show this message and exit.

Config example

# destination where the logs will be
log_dir: /var/log/DoTheBackup

# define your backups here
backup:
    my_documents:
        type: rsync
        # "month" means that it will save the backup in daily directories
        # for example: "/media/backup/documents/07"
        mode: month
        enabled: true
        source: /home/user/documents
        destination: /media/backup/documents
        # rsync --exclude patterns here
        exclude:
            - foo
            - bar
        # rsync --include patterns here
        include:
            - very_important_dir

    video:
        type: rsync
        # "once" backups straight in the destination directory
        # for example: "/media/backup/Videos"
        mode: once
        enabled: true
        source: /home/user/Media/Videos
        destination: /media/backup/Videos

    important_stuff:
        type: rsync
        mode: month
        enabled: true
        source: /home/user/very_important
        # this will use ssh to transfer the data over ssh
        destinaton: user@remote:/media/backup/important_stuff

    dothebackup:
        type: git
        enabled: true
        source: https://github.com/xsteadfastx/DoTheBackup.git
        destination: /media/backup/repos/dothebackup

    mygithubrepos:
        type: github
        enabled: true
        username: xsteadfastx
        destination: /media/backup/github

Type plugins

git

A simple git repo cloner. If the destination is not a cloned repo it will first perfom a git clone and then a git pull everytime dothebackup is running.

Keys

  • source

  • destination

github

This plugin gets a users public repo urls from the GitHub-API and starts to clone and pull them in a destination directory.

Keys

  • username

  • destination

rsync

It uses rsync to make backups. Be sure you have rsync installed.

Keys

  • source

  • destination

Modes

  • once: Copies one to one.

  • week: Keeps one week. It stores the files in a numbered day directory and uses hardlinks to link to the files that are not changed from the day before.

  • month: Keeps one month. it stores the files for one month in a day numbered directory and works with hardlinks just like the week mode.

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

dothebackup-0.1.2.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

dothebackup-0.1.2-py2.py3-none-any.whl (8.9 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file dothebackup-0.1.2.tar.gz.

File metadata

  • Download URL: dothebackup-0.1.2.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for dothebackup-0.1.2.tar.gz
Algorithm Hash digest
SHA256 ea6113e9c9d506eb718fc41cb41d6eb28ea05755fee7aa6680696798ccebfb7d
MD5 0519ae13c4bdbee3c35bd2e620dd9eee
BLAKE2b-256 0cf376a0b9d73a4cc3b3795994a21a1e46650304d40d6304df30cba23a1a31ef

See more details on using hashes here.

File details

Details for the file dothebackup-0.1.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for dothebackup-0.1.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 c7335c251dee7e961060dd1ad03e3280f032c289751bb8a62e8a91dd527f8935
MD5 4e9e30bcca90e8ead85a35b5ad1ef579
BLAKE2b-256 e71cc26e35bbf5396d2c6d533c321d4cc02048f4fb9e1a5439f8cfbdc731a55d

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