Skip to main content

Backup data to OpenStack Swift

Project description

This tool is that backup data to OpenStack Swift. provides features are command line interface, and backup rotatition. This tool is depend on swiftsc, that is simple client library of OpenStack Swift.


  • Python 2.6 or Python 3.2
  • swiftsc 0.2.2 later


$ git clone
$ cd backup2swift
$ sudo python install

or via PyPI:

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


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

username: username
password: password

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

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

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
$ bu2sw -c bu2sw.conf -p example.txt
$ bu2sw -c bu2sw.conf -l

See also man manual of bu2sw(1).


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.


  • create documents
  • add unit test


0.4 (2012-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 (2012-05-24)

  • fixes fail backup and rotate with verifing default SSL certificate

0.3.1 (2012-05-20)

  • add option to ignore verifing of SSL certificate

0.3 (2012-05-17)

  • add retrieve backup object command

0.2 (2012-05-10)

  • add backup object command
  • fixes man manual

0.1.3 (2012-05-10)

  • applied changing api of swiftsc.client.is_container()
  • add how to setup and usage

0.1.2 (2012-05-09)

  • fixes #3 failed to execute in python2.6

0.1.1 (2012-05-08)

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

0.1 (2012-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.

Files for backup2swift, version 0.4
Filename, size File type Python version Upload date Hashes
Filename, size backup2swift-0.4.tar.gz (25.4 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page