RFE - Add ability to selectively backup only certain tables
|Assigned To:||Partha Aji|
|Found in release:||Pull request:||https://github.com/theforeman/foreman/pull/4775|
|Velocity based estimate||-|
Many times when obtaining data from customers we want just a subset of the tables to analyze instead of a full backup. For example we may want to say "get me the dump of the foreman tasks tables". We do not care about the rest. Or the other way round. Get me all but the tasks for I just want the data". Will be nice if the backup rake file supported the tables options.
fixes #20699 - Rake task to selectively backup tables
This commit adds an optional param "tables" to db:dump task
One can use to this selectively dump data from desired tables.
Its main purpose is to curate debug data from customers for analysis.
For example one can run
rake db:dump RAILS_ENV=production tables="foreman_tasks.*, dynflow.*"
to get a copy of all the foreman-tasks and dynflow tables
Then on a local db one can choose to just restore those tables