Bug #20699
RFE - Add ability to selectively backup only certain tables
Description
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.
Associated revisions
History
#1
Updated by The Foreman Bot almost 5 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/4775 added
#2
Updated by Daniel Lobato Garcia almost 5 years ago
- Legacy Backlogs Release (now unused) set to 240
#3
Updated by Anonymous almost 5 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset a9396403e1045965fbd127ccc186d7705f7036e7.
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
and analyze