刘凡 9ff4d1d109 add S3,archive,truncate | hace 2 años | |
---|---|---|
.. | ||
osarchiver | hace 2 años | |
.gitignore | hace 2 años | |
AUTHORS | hace 2 años | |
CONTRIBUTING.md | hace 2 años | |
CONTRIBUTORS | hace 2 años | |
LICENSE | hace 2 años | |
MAINTAINERS | hace 2 años | |
README.md | hace 2 años | |
archiver_sample.ini | hace 2 años | |
diagram.asciio | hace 2 años | |
requirements.txt | hace 2 años | |
setup.cfg | hace 2 años | |
setup.py | hace 2 años |
OSArchiver is a python package that aims to archive and remove soft deleted data from OpenStack databases. The package is shiped with a main script called osarchiver that reads a configuration file and run the archivers.
OSArchiver reads an INI configuration file in which you can define:
.----------.
.--------------------------| Archiver |-----------------------------.
| '----------' |
| |
| |
| |
v _______________ v
.--------. \ \ .-------------.
| Source |-------------------->) ARCHIVE DATA )------------------>| Desinations |
'--------' /______________/ '-------------'
| | |
| | |
| | |
| | |
| | |
| v |
| .--------------------------. |
v ( No error and delete_data=1 ) |
'--------------------------' |
_.-----._ | _.-----._ |
.- -. | .- -. | ___
|-_ _-| | |-_ _-| | | |\
| ~-----~ | | | ~-----~ |<--'->| ' ___
| | | | | | SQL| |\
`._ _.' | `._ _.' |____| '-|---.
"-----" | "-----" | CSV | |
OpenStack DB v Archiving DB |_____| |
^ _______________ v
| \ \ .-----------------------.
'-------------------------) DELETE DATA ) ( remote_store configured )
/______________/ '-----------------------'
|
v
__________
[_|||||||_°]
[_|||||||_°]
[_|||||||_°]
Remote Storage (Swift, ...)
git clone https://github.com/ovh/osarchiver.git
cd osarchiver
pip install -r requirements.txt
pip setup.py install
# osarchiver --help
usage: osarchiver [-h] --config CONFIG [--log-file LOG_FILE]
[--log-level {info,warn,error,debug}] [--debug] [--dry-run]
optional arguments:
-h, --help show this help message and exit
--config CONFIG Configuration file to read
--log-file LOG_FILE Append log to the specified file
--log-level {info,warn,error,debug}
Set log level
--debug Enable debug mode
--dry-run Display what would be done without really deleting or
writing data
The configuation is an INI file containing several sections. You configure your differents archivers in this configuration file. An example is available at the root of the repository.
Example:
[archiver:My_Archiver]
src: os_prod
dst: file, db
[src:os_prod]
...
[dst:file]
...
[dst:db]
....
db
is supporteddb
or file
You've developed a new cool feature ? Fixed an annoying bug ? We'd be happy
to hear from you !
Have a look in CONTRIBUTING.md