Feature Idea: Direct partition dumping support in mysqldump (e.g., --partitions flag) #705
paraskumar09
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi everyone,
I wanted to open a discussion about improving how we dump partitioned tables using
mysqldump.Right now, if I want to take a dump of a single partition, I have to use the
--whereclause and manually write out the logic (like a specific date range) to match that partition. It works, but it feels a bit inefficient and leaves room for user error if the boundary logic is mistyped.The Idea:
Would it be possible to add a
--partitionsflag tomysqldump?Ideally, we could just run something like:
mysqldump db_name table_name --partitions=p2026_07 > backup.sqlThis would mirror how we can already do
SELECT * FROM table PARTITION (p2026_07)in standard queries. It would make backup scripts cleaner and less prone to logical errors.Is this something that has been considered before, or are there technical hurdles making this difficult to implement? Looking forward to hearing your thoughts!
All reactions