This file is indexed.

/usr/share/doc/python-backup2swift/README.rst is in python-backup2swift 0.8-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
==============================================
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 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
--------

* `OpenStack Object Storage Developer Guide <http://docs.openstack.org/api/openstack-object-storage/1.0/content/index.html>`_
* `swiftsc <https://github.com/mkouhei/swiftsc>`_