This documentation relates to the latest version of Confluence.
If you are using an earlier version, please go to the documentation home page and select the relevant version.

How do I... find unused spaces

All Versions
Click for all versions
Confluence 2.9 Documentation

Index

This page has been moved to the Administration section, and will be removed from here at some indeterminate point in the future.

Sometimes, you want to know what is not being used. It's great to know what's getting most attention, but what about stagnant pages, or even entire spaces that are no longer active?

While viewing space activity and the Global Statistics plugin can provide hints, they still doesn't always provide enough detail. The simple way is to go directly to the database. We recommend DbVisualizer, and have basic instructions for connecting it to HSQLDB.

The following query identifies the last date on which content was modified in each space within a single Confluence instance:

SELECT spaces.spacename, MAX(content.lastmoddate)
FROM content, spaces
WHERE content.spaceid = spaces.spaceid
GROUP BY spaces.spacename;

It returns a list of spacenames, and the last date and time at which any content was added or changed.

Alternatively, this one simply identifies spaces whose content hasn't changed since a specified date:

SELECT spaces.spacename
FROM content, spaces
WHERE content.spaceid = spaces.spaceid
GROUP BY spaces.spacename
HAVING MAX(content.lastmoddate) < '2006-10-10';

The result is a simple list of space names.

It's also possible to present the information in a wiki page, using the SQL plugin, which can be installed via the Plugin Repository. You'll also need to define a database Resource in conf/server.xml and confluence/WEB-INF/web.xml, as described here. Having done so, you can use wiki markup code like the following, replacing confluenceDS with the name of your own local datasource:

h3. Space activity
{sql:dataSource=confluenceDS|output=wiki}
SELECT spaces.spacename AS Space, MAX(content.lastmoddate) AS LastModified
FROM content, spaces
WHERE content.spaceid = spaces.spaceid
GROUP BY Space;
{sql}

Unable to render embedded object: File (SQLscreenshot.png) not found.

The Chart plugin can be used in combination with the SQL plugin to give more visually attractive results.

Labels:

faq_conf_dev faq_conf_dev Delete
confluence confluence Delete
Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.
  1. Oct 11, 2007

    Sarah Maddox says:

    Hi James, I happened to come across this page. It looks very useful indeed :) A ...

    Hi James, I happened to come across this page. It looks very useful indeed A couple of comments:

    • Are you planning to move this page into the Confluence Admin Guide? I think it's something that administrators will find very useful.
    • It may be better to use internal links rather than perm links. That way, we can see the incoming links on the pages you've referenced. (In case we plan to delete/move a page.) Internal links will be automatically updated if the page name changes, so there's no need to use a permlink for that purpose.
    1. Oct 11, 2007

      James Fleming [Atlassian] says:

      Thanks! If it'll be more useful elsewhere, I'll be happy to move it. I'm still ...

      Thanks!

      If it'll be more useful elsewhere, I'll be happy to move it.
      I'm still assimilating the various nuances of the links; will update these to be internal. As you've probably noticed already, I'm still tweaking the page after publishing it

      1. Oct 11, 2007

        Sarah Maddox says:

        How about this: Change the title of your page to something like 'Finding Unused...

        How about this:

        • Change the title of your page to something like 'Finding Unused Spaces'.
        • Move your page to the Administrator's Guide - make it a child of this page.
        • Add a link to your page on this page, under the section 'System Administration' --> 'System Administration' .
        • Also add a link to your page under the 'RELATED TOPICS' section of this page in the User's Guide. Text for this link would be something like 'Administrator's Guide - Finding Unused Spaces' (to point out that we're directing them to the Admin Guide).
  2. Oct 19, 2007

    James Mortimer says:

    would you consider renaming this (and other) pages to exclude the ? so that they...
    • would you consider renaming this (and other) pages to exclude the ? so that they work with interwiki links, such as [DOC/how do I find unused spaces@atlassian]

Add Comment