Skip to main content

Backup data to OpenStack Swift

Project description

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=master https://coveralls.io/repos/mkouhei/backup2swift/badge.png?branch=master https://img.shields.io/pypi/v/backup2swift.svg

Requirements

  • Python 2.7 later or Python 3.3 later

  • swiftsc 0.6.3 later

Setup

$ pip install --user backup2swift
or
(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
#ignore_verify_ssl_certification: True
#timeout: 5.0

[backup]
rotate_limit: 10

#[keystone]
#tenant_id: tenant_id

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).

See also

ToDo

  • create documents

History

0.9.2 (2015-05-17)

  • Changes os.environ[‘HOME’] to os.expanduser(‘~’).

  • Changes httpretty to requests_mock.

  • Supports wheel.

  • Applies pep257 and fixes the violations.

0.9.1 (2015-03-17)

  • Fail creating object from stdin.

0.9.0 (2015-03-12)

  • Changed using swiftsc.Client().

    • This is supported swiftsc >= 0.6.0.

  • Supported PyPy.

  • Fixed some issues.

0.8.4 (2014-11-19)

  • Supported timeout option.

0.8.3 (2014-11-16)

  • Fixed #20 “rotate_limit” seems not to work.

  • Unsupported Python3.2, PyPy.

  • Appended pass through tox from python setup.py test.

  • Integrated pylint, pychecker, pep8, flakes to Tox.

  • Fixed violation of pylint.

  • Fixed argument of exception at backup_file method.

0.8.2 (2014-05-10)

  • Refactoring.

  • Apply tox for unit test.

  • Support Python 3.4, PyPI.

0.8.1 (2014-01-10)

  • Append Python 3 classifier to setup.py

  • Refine description.

    • Thanks, Thomas Goirand.

  • Bug fix

    • ImportError: No module named magic in travis-ci

0.8 (2013-07-27)

  • read the file from stdin pipe

  • Omitted option of –container

0.7 (2013-06-14)

  • support Python 3.2, 3.3

0.6 (2013-06-03)

  • support authentication of keystone

0.5 (2013-05-30)

  • New features

    • upload / retrieve / delete in parallel

    • support to delete multiple objects

  • Bug fix

    • fixes fail to raise IOError if default config file exists

    • fail to use “rotate_limit” option on configuration file

    • support pep8 less than version 1.3

0.4 (2013-05-29)

  • New features

    • support default config file

    • specify any container

    • support to retrieve multiple objects

    • specify multiple upload files

  • Bug fix

    • fixes spelling error

    • remove pychecker for travis

0.3.2 (2013-05-24)

  • fixes fail backup and rotate with verifing default SSL certificate

0.3.1 (2013-05-20)

  • add option to ignore verifing of SSL certificate

0.3 (2013-05-17)

  • add retrieve backup object command

0.2 (2013-05-10)

  • add backup object command

  • fixes man manual

0.1.3 (2013-05-10)

  • applied changing api of swiftsc.client.is_container()

  • add how to setup and usage

0.1.2 (2013-05-09)

  • fixes #3 failed to execute in python2.6

0.1.1 (2013-05-08)

  • fixes #1 fail to execute firstly when there is no container

0.1 (2013-05-08)

  • first release

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

backup2swift-0.9.2.tar.gz (28.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

backup2swift-0.9.2-py2.py3-none-any.whl (20.4 kB view details)

Uploaded Python 2Python 3

File details

Details for the file backup2swift-0.9.2.tar.gz.

File metadata

  • Download URL: backup2swift-0.9.2.tar.gz
  • Upload date:
  • Size: 28.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for backup2swift-0.9.2.tar.gz
Algorithm Hash digest
SHA256 6b31e8d70d2e895a2856f87635e9f51a5934efae6a04e8dd8a47cb62b3a1685b
MD5 a1b8beb3b05543f36a2144082ae85436
BLAKE2b-256 e003e9d3183155dee523484d0271264557acf129ece5ce8ba14c0e2ed50f61ed

See more details on using hashes here.

File details

Details for the file backup2swift-0.9.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for backup2swift-0.9.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 27616dd7890c90c303cfe88254f27c8b543c822dead150005f51cda48303834b
MD5 77597c715933077f3331f8987611fe13
BLAKE2b-256 b8d271668e12821576069d6b5714766b7fe9b591a703ecd3961e5af1336164ff

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page