Code Monkey home page Code Monkey logo

db-archiver's Introduction

Configuration:
  • Copy config template to actual config file cp db-archiver-config.yml.sample db-archiver-config.yml
  • Modify config file with actual credentials vi db-archiver-config.yml
Example usage:

python src/db_archiver.py --table my_table_name --where "created < now() - interval 6 month" --column_name_to_log id

To create a mysql user with privileges just enough for this tool
CREATE USER 'db_archiver' IDENTIFIED BY 'somepassword';
GRANT SELECT, DELETE ON `<db_to_archive>`.`<table_to_archive>` TO 'db_archiver';
GRANT CREATE, INSERT, SELECT, DROP ON `<db_to_archive>`_archive.`<table_to_archive>`_archive TO 'db_archiver';

db-archiver's People

Contributors

anujith-singh avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.