Skip to content

Archive MySQL tables to S3, this is a wrapper on top of pt-archiver from Percona

License

Notifications You must be signed in to change notification settings

anujith-singh/db-archiver

Repository files navigation

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';

About

Archive MySQL tables to S3, this is a wrapper on top of pt-archiver from Percona

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published