Giter Site home page Giter Site logo

backup2swift's Introduction

backup2swift is backup data to OpenStack Swift

This utility is used to backup data to OpenStack Swift. It provides a command interface and backup rotation. It depends on a simple client library called swiftsc.

https://secure.travis-ci.org/mkouhei/backup2swift.png?branch=devel https://coveralls.io/repos/mkouhei/backup2swift/badge.png?branch=devel https://pypip.in/v/backup2swift/badge.png

Requirements

  • Python 2.6 later or Python 3.2 later
  • swiftsc 0.5 later

Setup

$ git clone https://github.com/mkouhei/backup2swift
$ cd backup2swift
$ sudo python setup.py install

or via PyPI:

$ virtualenv --no-site-packages venv
$ pip install backup2swift

Usage

Firstly setup configuration file. You may save the file name of your choice as setting. Example is as folloing:

[swift]
auth_url: https://example.org/auth/v1.0
username: username
password: password

[backup]
rotate_limit: 10

The "auth_url" is swift authentication url, "username" and "password" are swift's. If you need to ignore verification of SSL certification, append option as "ignore_verify_ssl_certification: True" to [swift] section. "rotate_limit" is limitation count of rotation for backup. If this value is 3, backup is as folloing;

backup target file name: example.txt

Firstly backup object is created as same name of backup target file (that is "example.txt"):

$ bu2sw -c bu2sw.conf -p example.txt
$ bu2sw -c bu2sw.conf -l
example.txt

Secondly backup object is created as same name of backup target file, and first backup object is renamed added timestamp as "example.txt_YYYYMMDD-hhmmss".:

$ bu2sw -c bu2sw.conf -p example.txt
$ bu2sw -c bu2sw.conf -l
example.txt
example.txt_20130510-113930

Backup objects named with timestamp are created until "rotate_limit" value. Old backup object is remove when execute backup over limitation.:

$ bu2sw -c bu2sw.conf -p example.txt
$ bu2sw -c bu2sw.conf -l
example.txt
example.txt_20130510-113930
example.txt_20130510-113941
example.txt_20130510-113953
$ bu2sw -c bu2sw.conf -p example.txt
$ bu2sw -c bu2sw.conf -l
example.txt
example.txt_20130510-113941
example.txt_20130510-113953
example.txt_20130510-114110

See also man manual of bu2sw(1).

Contribute

Firstly copy pre-commit hook script.:

$ cp -f utils/pre-commit.txt .git/hooks/pre-commit

Next install python2.6 later, and python-swiftsc, py.test. Below in Debian GNU/Linux Sid system,:

$ sudo apt-get install python python-swiftsc python-pytest pep8

Then checkout 'devel' branch for development, commit your changes. Before pull request, execute git rebase.

See also

backup2swift's People

Contributors

mkouhei avatar

Watchers

 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.