Friday, 12 October 2018

Domino 10 - New Administration Feature: Document Deletion Logging

In my previous blog posts I described already some new Domino 10 Administrator features. In this blog post I will describe the new Administration feature Document Deletion Logging. During 2015 I wrote a blog post about deletion logging based on a solution by Paul Withers, Quick Tip: Easy implement Deletion Logging into your Notes Applications. In Domino 10 there is a new server compact option available to enable logging of data about deleted documents in databases that can be specified. The deletion logging data is logged to entries in deletion log files added to the IBM_TECHNICAL_SUPPORT directory on the Domino Server. Below a short description how to enable deletion logging for specific databases and an explanation of the data in the deletion log entry.


Enable deletion logging for specific databases
First ensure that transaction logging is enabled for the databases. For information see the section on Transaction Logging in the Domino 9.0.1 documentation or the IBM Technote Setting up a Domino server for transaction logging.
Next run compact as follows on the Domino server console:
load compact <database path> -dl on "<comma separated list of items>" where <database path> is a specific database or a directory of databases relative to the data directory. <comma separated list of items> is a list of fields to show in the logs to help you identify deleted documents. The fields must be one of these types: Text, Text_List, RFC822_Text, or Time. See the example below for enabling deletion logging for a specific database in a subdirectory.


The results of enabling deletion logging is that when documents are deleted from a specific database entries are added to the current deletion log file, delete.log. When the server is restarted a new deletion log file is created. Old deletion log files are renamed to delete_<servername>_yyyy_mm_dd@hh_mm_ss.log. See for examples the screenshot above. Deleting a document from a database adds an entry to the current deletion log with the following data. This data is provided in a CSV-compatible format.

Data in deletion log entry More information
Date and time of the document deletion
Database from which the document was
deleted.
Relative to the data directory
Replica ID of the database Helps to find multiple replicas of a
database in the log if the database name is
not the same on all servers.
Process that did the deletion For example: server - dbmt - replica
Name of the server or person who deleted
the document
Type of document deletion SOFT -- document is in the trash
HARD -- Stub delete (for example when the
document is deleted from the trash)
RESTORE - (document restored after a SOFT
delete)
Class of document deleted Specified as one of the following hex values: v
0001 (Document - NOTE_CLASS_DATA)
0002 (About Database Document -
NOTE_CLASS_INFO)
0004 (Form - NOTE_CLASS_FORM)
UNID Unique document identifier across replicas

UNDO entries in the deletion log
In specific situations it is possible for a document deletion not to be carried out as a result of a failure of some sort. In that case an UNDO entry is shown in the deletion log with an UNDO flag and the following data.
Date and time of the document deletion
Database from which document was deleted
Replica ID of database
UNDO flag
Type of delete that was undone
UNID for the document

Example of a deletion entry in the deletion log:


Data in deletion log entry Example output
Date and time of the document deletion "20181012T150232,71+02"
Database from which the document was
deleted
"applications\testnifnsf.nsf"
Replica ID of the database "C125830C:00209A44"
Process that did the deletion "nserver"
Name of the server or person who deleted
the document
"CN=JO"
Type of document deletion "HARD"
Class of document deleted "0001"
UNID "A239146D:1E04C3D7C125724B:004FD327"

Disabling deletion logging
To disable deletion logging for specific databases, run the following command at the server console: load compact -dl off where is a specific database or a directory of databases, relative to the data directory. 

No comments:

Post a Comment