Skip to main content

ibdx

Use case

  • backup/restore mysql InnoDB tables in an easy way

Setup

From pypi

pip install ibdx
or
pipx install ibdx (recommended)

From source

git clone https://github.com/Grvzard/ibdx.git
cd ibdx
pip install .

Usage

ibdx --help

Take care: There seems to be an incompatibility between mysql and mariadb. Make sure that ibdx works between the same db system.

Example

Let's say we have following tables: [ logs_2023_01, logs_2023_02, logs_2023_03, logs_2023_04 ]

ibdx backup -u user -p password -h localhost --db test1 --tables logs_2023_% -f logs.2023.zip [--datadir /mysql/datadir]
ibdx restore -f logs.2023.zip -u user -p password -h localhost --db test1 --tables logs_2023_% [--datadir /mysql/datadir]

When the mysql server is running in Docker, the --datadir option is required.

Script Workflow

backup:

  1. mysql> FLUSH TABLES test1 FOR EXPORT; (tables are read locked)
  2. backup the .ibd (and .cfg) files.
  3. mysql> UNLOCK TABLES;

restore:

  1. (optional) mysql> CREATE TABLE test1;
  2. mysql> ALTER TABLE test1 DISCARD TABLESPACE;
  3. copy the .ibd (and .cfg) files to the mysql-server's datadir
  4. mysql> ALTER TABLE test1 IMPORT TABLESPACE;

Reference

MariaDB Knowledge Base > InnoDB File-Per-Table Tablespaces

Release files for ibdx 0.5.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ibdx 0.5.1
File Size Uploaded
ibdx-0.5.1.tar.gz 6.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ibdx 0.5.1
File Interpreter ABI Platform
ibdx-0.5.1-py3-none-any.whl Python 3 none any Details

Total release size: 12.5 kB

Release files / ibdx-0.5.1.tar.gz

Download URL ibdx-0.5.1.tar.gz
Size 6.0 kB
Tags Source
SHA-256 checksum
How to use checksums
f044aa110002995db4816299c3f75ad742909ee0e474e73dbee1b21233cba406
BLAKE2b-256 checksum
How to use checksums
326165706752af5ded9929d408ffa50d5a66c8940004b83278e5bf09221a8c36
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.7

Release files / ibdx-0.5.1-py3-none-any.whl

Download URL ibdx-0.5.1-py3-none-any.whl
Size 6.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f4e2c114e31fed9a059baf278ba7908c0137b51dc64270ea54ac93c762e98327
BLAKE2b-256 checksum
How to use checksums
429fbe9fde7137e0d80111832db52e3bd8db05f269d0effef22d5f132b28ce5a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.7

Release history Release notifications | RSS feed

This release

0.5.1 This release

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.3

2 release files

0.3.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page