Git Product home page Git Product logo

bytehold's Introduction

Bytehold

Simple backup tool written in python3, which helps not to repeat scripts.

Is based on handlers, and is very simple to extend. Creating a new handler and use it. The syntax is simplar to scons (declarative classes).

The simplest and most direct is to use a python module. But if you like. Ini files backups can define a very simple way. In general, the script only needs to know that data store and how to access that data.

Implemented handlers

  • FileSystem (use rsync for sincronize)
  • PostgreSQL (use pg_dump for database dump, xz for compression and scp for transport)
  • MySQL (mysqldump and mysqlhotcopy)
  • Tarball (Simple compressed tarball)

Compression format handling supported

  • Gzip
  • Bzip2
  • XZ (default)

Sample python declarative configuration:

from bytehold import Environment
from bytehold.handlers import FileSystem

Environment(name="mormont", remote_host="niwi@localhost", remote_path="/tmp/")
FileSystem(name="My Temporal directory", paths=['/home/niwi/tmp'])

Environment

Environment is a mandatory class, this stores all global variables need by handlers.

Arguments reference

name

Is a name that represents a backup, if not specified, hostname is used.

remote_host

Is a complete host and username string that representing the backup server.

remote_path

Is a base path on remote backup server on stores all backups. On this directory now need create other subdirectory that matches with envoronment name.

The backup files genetated by this script, are stored on {remote_path}/{environ:name}/

Usage examples:

And, this is a example:

[[email protected]][~/devel/bytehold]% ./bh -p backup.py.example -v
FileSystem - starting filesystem backup handler (My Temporal directory).
FileSystem - exec: rsync -avr /home/niwi/tmp niwi@localhost:/tmp/mormont

How to install

Yo can pull the git repo and execute python setup.py install.

TODO

  • Sphinx documentation.
  • Automaticaly create remote directory on demand. (Fix first execution fail if remote directory not exists)
  • Version check handler.

bytehold's People

Watchers

James Cloos avatar Vlad Trukhin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.