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.
- Python 2.7 later or Python 3.3 later
- swiftsc 0.6.3 later
$ pip install --user backup2swift or (venv)$ pip install backup2swift
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).
- create documents
- Updates swiftsc version.
- Supports Python 3.6.
- Adds handling of authentiction error.
- Change dependency swiftsc version (Supports Identity API v3).
- Supports Python 3.5 (3.5.0-rc2).
- Fixes requests-mock package name.
- Changes os.environ[‘HOME’] to os.expanduser(‘~’).
- Changes httpretty to requests_mock.
- Supports wheel.
- Applies pep257 and fixes the violations.
- Fail creating object from stdin.
- Changed using swiftsc.Client().
- This is supported swiftsc >= 0.6.0.
- Supported PyPy.
- Fixed some issues.
- Supported timeout option.
- 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.
- Apply tox for unit test.
- Support Python 3.4, PyPI.
- Append Python 3 classifier to setup.py
- Refine description.
- Thanks, Thomas Goirand.
- Bug fix
- ImportError: No module named magic in travis-ci
- read the file from stdin pipe
- Omitted option of –container
- support Python 3.2, 3.3
- support authentication of keystone
- 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
- 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
- fixes fail backup and rotate with verifing default SSL certificate
- add option to ignore verifing of SSL certificate
- add retrieve backup object command
- add backup object command
- fixes man manual
- applied changing api of swiftsc.client.is_container()
- add how to setup and usage
- fixes #3 failed to execute in python2.6
- fixes #1 fail to execute firstly when there is no container
- first release
Release history Release notifications
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size backup2swift-0.9.5.tar.gz (29.1 kB)||File type Source||Python version None||Upload date||Hashes View hashes|