Skip to content

Feature Request: Add support for executing SQL queries prior to taking a backup #18886

@mattlord

Description

@mattlord

Feature Description

There are various scenarios where it would be really nice to be able to specify a set of SQL queries to run just prior to initializing the backup of a tablet.

The user would provide an optional list of backup init SQL queries to run before taking the backup, the tablet types to run them on, when to timeout that work, and whether or not to fail the backup if we are unable to perform the work (including if we hit the timeout).

Use Case(s)

For example, this could be used to run OPTIMIZE TABLE on 1 or more tables which you know will benefit from that. This example can improve the table copy time (to backup storage), reduce the storage used for the table in the backup, and improve the restore time for the table as well.

It could be similar to MySQL's init options

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions