How to find the deleted date for a page in trash
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
In Confluence versions earlier than 7.14.0 pages in trash will not have a deleted date. It is possible to extract this information manually from the database.
Environment
Applies to Confluence versions earlier than 7.14.0
Solution
We store details regarding when a page was deleted in the AO_7B47A5_EVENT table, an example for a trashed page is below:
CONTAINER_ID | CONTENT_ID | EVENT_AT | ID | NAME | SPACE_KEY | USER_KEY | VERSION_MODIFICATION_DATE
--------------+------------+---------------+----+-------------------+-----------+----------------------------------+---------------------------
950274 | 950274 | 1658389092657 | 16 | page_trashed | PD | 2cb280837b59e6ab017b59e818c90000 | 1658388853479
The EVENT_AT column stores the timestamp and the NAME column stores the event type, page_trashed is when a page was deleted.
The following SQL query should pull out the details needed to see when a deleted page was put into the trash and present the timestamp in a more readable form:
select content.title AS Title, to_timestamp(event."EVENT_AT" / 1000)::timestamp AS Timestamp
from "AO_7B47A5_EVENT" event
join content ON content.contentid=event."CONTENT_ID"
where event."NAME"='page_trashed';