You are here

function _backup_migrate_default_structure_only_tables in Backup and Migrate 6

Same name and namespace in other branches
  1. 8.2 includes/db.inc \_backup_migrate_default_structure_only_tables()
  2. 5.2 includes/db.inc \_backup_migrate_default_structure_only_tables()
  3. 5 backup_migrate.module \_backup_migrate_default_structure_only_tables()

Return the default tables whose data can be ignored. These tables mostly contain info which can be easily reproducted (such as cache or search index) but also tables which can become quite bloated but are not necessarily extremely important to back up or migrate during development (such ass access log and watchdog)

3 calls to _backup_migrate_default_structure_only_tables()
backup_migrate_backup in ./backup_migrate.module
The backup/export form.
backup_migrate_cron in ./backup_migrate.module
Implementation of hook_cron(),
_backup_migrate_backup_with_defaults in ./backup_migrate.module
Backup the database with the default settings.

File

./backup_migrate.module, line 1222
Create (manually or scheduled) and restore backups of your Drupal MySQL database with an option to exclude table data (f.e. cache_*)

Code

function _backup_migrate_default_structure_only_tables() {
  $core = array(
    'cache',
    'cache_filter',
    'cache_calendar_ical',
    'cache_menu',
    'cache_page',
    'cache_views',
    'sessions',
    'search_dataset',
    'search_index',
    'search_keywords_log',
    'search_total',
    'watchdog',
    'accesslog',
    'devel_queries',
    'devel_times',
  );
  $alltables = array_merge($core, module_invoke_all('devel_caches'));
  global $db_prefix;
  foreach ($alltables as $table) {
    $prefixed_tables[] = $db_prefix . $table;
  }
  return $prefixed_tables;
}