Skip to main content

backup2swift is backup data to OpenStack Swift

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.

Requirements

  • Python 2.6 or Python 3.2

  • swiftsc 0.2 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. “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

ToDo

  • create documents

  • add unit test

History

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

Metadata

Release files for backup2swift 0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for backup2swift 0.2
File Size Uploaded
backup2swift-0.2.tar.gz 22.5 kB Details

Release files / backup2swift-0.2.tar.gz

Download URL backup2swift-0.2.tar.gz
Size 22.5 kB
Tags Source
SHA-256 checksum
How to use checksums
87b01abe1b774120c9c3066a42571f58f652c446fad79c2e6fcfc2f6ff5eefec
BLAKE2b-256 checksum
How to use checksums
e07d8d924ec8268bd135c92342ac7884b22803da2096973473f5db39eb699697
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

0.9.5

1 release file

0.9.4

1 release file

0.9.3

1 release file

0.9.2

2 release files

0.9.1

1 release file

0.9.0

1 release file

0.8.4

1 release file

0.8.3

1 release file

0.8.2

1 release file

0.8.1

1 release file

0.8

1 release file

0.7

1 release file

0.6

1 release file

0.5

1 release file

0.4

1 release file

0.3.2

1 release file

0.3.1

1 release file

0.3

1 release file

This release

0.2 This release

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page