Bug #20699

RFE - Add ability to selectively backup only certain tables

Added by Partha Aji almost 5 years ago. Updated about 4 years ago.

Rake tasks
Target version:
Bugzilla link:
Fixed in Releases:
Found in Releases:


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

Revision a9396403 (diff)
Added by Partha Aji almost 5 years ago

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


#1 Updated by The Foreman Bot almost 5 years ago

  • Status changed from New to Ready For Testing
  • Pull request 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

Also available in: Atom PDF