Database Tables Exclusion

Sometimes you can have multiple sites installed in the same database, a common situation with sub-domains on cheap hosts who allow only one database per account. Some other times you have installed a forum, a torrent tracker or whatever on a subdirectory of your site and it has created tables in your site's database. Now it is possible to exclude these tables using the Database tables exclusion feature.

Database Tables Exclusion - Normal View

The normal view of this page consists of three discrete areas.

The top area contains the component and page names and two links to switch between the normal and the tabular view modes.

The middle area contains the Current Database drop-down list. The application can define filters for the site's main database or for each of the extra database definitions separately. The default selection, Site's main database, contains all filters pertaining to the main site's database, i.e. the one you configure to be backed up. If you have defined extra databases, you can select the appropriate database from the drop-down list in order to define filters for that database.

The middle area also contains two quick buttons:

  • Exclude non-core tables. This option automatically filters out the tables whose name doesn't begin with your site's prefix. However, be aware of the major pitfall! You'll have to use this option every time you add a new table with a different prefix if you want it to be excluded. Alternatively, you can use the Regular Expressions Database Tables feature which can automatically deal with such installations.

  • Reset all filters. Clicking this button will delete all database table filters.

The lower area consists of a single pane, showing the contents of the database: tables, views, triggers, stored procedures and functions. Each row represents one database entity and consists of icons and text. The two leftmost icons represent an exclusion type and can have three states: on (yellow background), off (white background), or force enabled (red background). You can toggle between the on and off states by clicking on the icon. The force enabled state means that this exclusion type is active (on) and forcibly enabled by another feature of the application, such as regular expressions filters or simply denotes that a specific filter is not applicable to this entity. For example, there is no point the data dump of a view, or a stored procedure, as they have no data in the sense a table does. The third icon, next to the database entity's name, represents the type of the entity, e.g. table, view, etc. You can hover your mouse over the icon to get a tooltip describing the type of entity.


The prefixes of the entities' names appear abstracted. If your site's prefix is wp_ , the table wp_users will appear as #__users. This is done to help you quickly identify the tables your site runs on.

Each row of this pane consists of the following elements:

  • Exclusion icon. If enabled, this database entity will not be backed up at all, i.e. it will be missing from the database dump.

  • Data exclusion icon. If enabled, only the structure of a table will be backed up, but not its contents. This is useful e.g. for banner tracking or log tables. You need to keep their structure so that your site works, but you don't need to back up tens of thousands of historical data rows you can certainly live without.

  • Entity type icon. Depends on the entity type, e.g. if it's a view, table, procedure, etc. Hover your mouse over it to read the table type.

  • Entity name. The name of the entity, as described above.

Database Tables Exclusion - Tabular View

When you click on the Tabular View link, the page radically changes format. Instead of a database browser pane, you now have a grid.

Above the grid you have the Add new filter buttons:

  • Exclude this. Completely skips backing up the given database entity.

  • Do not backup its contents. Backs up only the structure but not the contents of the given table.

Each line of the grid displays the following information:

  • The filter type. It can be one of:

    • Exclude this. Completely skips backing up the given database entity.

    • Do not backup its contents. Backs up only the structure but not the contents of the given table.

  • Trashcan. When you click it, the filter row will be removed.

  • Pencil. When you click it, the row switches to edit mode

  • The filter item itself. It is the abstracted database entity name which the filter row applies to. When we say "abstracted" we mean that the site's prefix has to be replaced by #__.

When you click on the pencil icon, the filter item becomes an edit box. You can type in the new abstracted database entity name and then click outside the edit box, or press Tab on your keyboard, to immediately save the changes. There is no way to undo your changes.