All Projects → ovh → osarchiver

ovh / osarchiver

Licence: other
OpenStack databases archiver

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to osarchiver

testbed
With this testbed, it is possible to run a full OSISM installation, the baseline of the Sovereign Cloud Stack, on an existing OpenStack environment such as City Cloud or Open Telekom Cloud.
Stars: ✭ 51 (+264.29%)
Mutual labels:  openstack
iovisor-ovn
IOVisor OVN integration
Stars: ✭ 62 (+342.86%)
Mutual labels:  openstack
openstack-cloud-controller-manager
This repository has moved to https://github.com/kubernetes/cloud-provider-openstack
Stars: ✭ 17 (+21.43%)
Mutual labels:  openstack
cloudpods
A cloud-native open-source unified multi-cloud and hybrid-cloud platform. 开源、云原生的多云管理及混合云融合平台
Stars: ✭ 1,469 (+10392.86%)
Mutual labels:  openstack
docs.hypernetes.com
Hypernetes documentation.
Stars: ✭ 20 (+42.86%)
Mutual labels:  openstack
faythe
An experimental cluster brings Prometheus and OpenStack together
Stars: ✭ 18 (+28.57%)
Mutual labels:  openstack
YouTube-MA
💾 YouTube video metadata archiver written in Golang
Stars: ✭ 17 (+21.43%)
Mutual labels:  archiver
openstack
Production-ready Openstack installer using Ansible
Stars: ✭ 34 (+142.86%)
Mutual labels:  openstack
lxqt-archiver
A simple & lightweight desktop-agnostic Qt file archiver
Stars: ✭ 23 (+64.29%)
Mutual labels:  archiver
terraform-openstack
Create multiple instances with floating ip assigning on openstack using terraform.
Stars: ✭ 33 (+135.71%)
Mutual labels:  openstack
cutouts
Sign up, and start adding the articles that you have read and want to remember!
Stars: ✭ 13 (-7.14%)
Mutual labels:  archiver
dinivas
AWS, GCP alternative on premise. Dinivas manage your private Cloud (OpenStack) infrastructure by providing many features based on popular Open Source projects
Stars: ✭ 15 (+7.14%)
Mutual labels:  openstack
laravel-ovh
Wrapper for OVH Object Storage integration with laravel
Stars: ✭ 30 (+114.29%)
Mutual labels:  openstack
vagrant-openstack
Vagrant OpenStack-Ansible Environment used by OpenStack Cloud Computing Cookbook 4th Edition
Stars: ✭ 45 (+221.43%)
Mutual labels:  openstack
storage
Go library providing common interface for working across multiple cloud storage backends
Stars: ✭ 154 (+1000%)
Mutual labels:  openstack
WEB CodeSquare AmongUs
군 복무중인 개발자를 위한 국방망용 통합 개발 플랫폼
Stars: ✭ 42 (+200%)
Mutual labels:  openstack
Archive7z
This library provides handling of 7z files in PHP
Stars: ✭ 73 (+421.43%)
Mutual labels:  archiver
socok8s
Experimental tool for deploying SUSE OpenStack Cloud in Kubernetes cluster
Stars: ✭ 15 (+7.14%)
Mutual labels:  openstack
jupyterhub-deploy-kubernetes-jetstream
Configuration files for my tutorials on deploying JupyterHub on top of Kubernetes on XSEDE Jetstream (Openstack)
Stars: ✭ 15 (+7.14%)
Mutual labels:  openstack
browbeat
Performance monitoring and testing of OpenStack
Stars: ✭ 80 (+471.43%)
Mutual labels:  openstack

OSArchiver: OpenStack databases archiver

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.

Philosophy

  • OSArchiver doesn't have any knowledge of Openstack business objects
  • OSArchiver purely relies on the common way of how OpenStack marks data as deleted by setting the column 'deleted_at' to a datetime. It means that a row is archivable/removable if the 'deleted_at' column is not NULL

Limitations

  • Support Mysql/MariaDB as db backend.
  • python >= 3.5

Design

OSArchiver reads an INI configuration file in which you can define:

  • archivers: a section that hold one source and a non mandatory list of destinations
  • sources: a section that define a source of where the data should be read (basically the OS DB)
  • destinations: a section that define where the data should be archived

How does it works:

                                   .----------.
        .--------------------------| 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, ...)

Installation

git clone https://github.com/ovh/osarchiver.git
cd osarchiver
pip install -r requirements.txt
pip setup.py install

osarchiver script

# 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

Configuration

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.

DEFAULT section:

  • Drescription: default section that define default/fallback value for options
  • Format [DEFAULT]
  • configuration parameters: all the parameters of archiver, source, destination and backend section can be added in this section, those will be the fallback value if the value is not set in a section.

Archiver section:

  • Description: defines where to read data and where to archive them and/or delete.
  • Format [archiver:name]
  • configuration parameters:
    • src: name of the src section
    • dst: comma separated list of destination section names
    • enable: 1 or 0, if set to 0 the archiver is ignored and not run

Example:

[archiver:My_Archiver]
src: os_prod
dst: file, db

[src:os_prod]
...

[dst:file]
...

[dst:db]
....

Source section:

  • Description: defines where the OpenStack database are. It supports for now one backend (db) but it may be easily extended
  • Format [src:name]
  • configuration parameters:
    • backend*: the name of backend to use, only db is supported
    • retention: 12 MONTH
    • archive_data: 0 or 1 if set to 1 expect a dest to archive the data else won't run the archiving step just the delete step.
    • delete_data: 0 or 1 if set to 1 will run the delete step. If the archive step fails the delete step is not run to prevent loose of data.
    • backend specific options

Destination section:

  • Description: defines where the data should be written. It supports for now two backends (db for datatabase and file [csv, sql]) and may be extended
  • Format [dst:name]
  • configuration parameters:
    • backend*: the name of backend to use, db or file
    • backend specific options

Backends options:

db

  • Description: is the database (mysql/mariadb) backend
  • options:
    • host: DB host to connect to
    • port: port of MariaDB server is running on
    • user: login of MariaDB server to connect with
    • password: password of user
    • delete_limit: apply a LIMIT to DELETE statement
    • select_limit: apply a LIMIT to SELECT statement
    • bulk_insert: data are inserted in DB every builk_insert rows
    • deleted_column: name of column that holds the date of soft delete, is also used to filter table to archive, it means that the table must have the deleted_column to be archived
    • where: the literal SQL where applied to the select statement Ex: where=${deleted_column} <= SUBDATE(NOW(), INTERVAL ${retention})
    • retention: how long time of data to keep in database (SQL format: 12 MONTH, 1 DAY, etc..)
    • excluded_databases: comma, cariage return or semicolon separated regexp of DB to exclude when specfiying '*' as database. The following DB are akways ignored: 'mysql', 'performance_schema', 'information_schema'
    • excluded_tables: comma, cariage return or semicolon separated regexp of DB to exclude when specifying '' as table. Ex: shadow_.,.*_archived
    • db_suffix: a non mendatory suffix to apply to the archiving DB. The default suffix '_archive' is applied if you archive on same host than source without setting a db_suffix or table_suffix (avoid reading and writing on the same db.table)
    • table_suffix: apply a suffix to the archinving table if specified

file

  • Description: is the file archiving destination type, it writes SQL data in a file using one or several formats (supported: SQL, CSV)
    • directory: the directory path where to archive data. You may use the {date} keyword to append automaticaly the date to the directory path. (/backup/archive_{date})
    • formats: a comma, semicolon or cariage return separated list that define the format in witch archive the data (csv, sql)

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

Related links

License

See https://github.com/ovh/osarchiver/blob/master/LICENSE

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].