CLI Reference > Server Administration Commands > im purgeauditlog
  
im purgeauditlog
deletes and archives specified audit log records on the Windchill RV&S Server
Synopsis
im purgeauditlog [--before=value] [--maxFileSize=value] [(-Ffile|--selectionFile=file)] [--[no]backup] [--[no]batch] [--cwd=directory] [--forceConfirm=[yes|no]] [-g|--gui][--user=name] [--hostname=server] [(-N|--no)] [--password=password] [--port=number] [--quiet] [--settingsUI=[gui|default]] [--status=[none|gui|default]] [(-?|--usage)] [(-Y|--yes)]
Description
im purgeauditlog allows you to delete and archive specified records from the Windchill RV&S Server audit log. You can choose to delete or archive records older than a specified date, thereby controlling the size of the audit log table in the database. Each purging or archiving operation is also recorded in the audit log if mksis.auditor.is=true.
By default, the purged records are automatically archived in a backup directory on the Windchill RV&S Server. The audit archive is stored in a comma-separated value format (CSV). The default location of the audit log backup is controlled by the mksis.auditlogbackupdir= property in the is.properties file. For more information, see the Windchill RV&S Help Center.
For example, the following command purges all audit log records prior to 10:00AM on January 20, 2007 and creates a CSV file archive of the records in the default directory:
im purgeauditlog --before="01/20/2007 10:00:00 AM"
The following command purges all audit records prior to 10:00AM on January 20, 2007 without creating a CSV file archive:
im purgeauditlog --before="01/20/2007 10:00:00 AM" --nobbackup
Options
This command takes the universal options available to all im commands, as well as some general options. See the options reference page for descriptions.
--before=value
where value specifies a single date in the format MM/dd/yyyy h:mm:ss [AM|PM]. All audit records created prior to the specified date are permanently deleted or archived from the database, according to the options you specify. The date value cannot be used to filter for records newer than a given date. By default, purged records are archived to the <installdir>\data\auditbackup directory (where <installdir> is the path to the directory where you installed the Windchill RV&S Server). The file is assigned the name auditlogbackup_*.csv (where _* is _MMDDYYYYhhmmss_0 and _0 is incremented if a file of the same name already exists).
--maxFileSize=value
specifies the maximum file size (in megabytes) allowed for the created archive audit log. By default, the maximum file size is set at 50 MB. You can specify file sizes up to the maximum available on your file system.
--[no]backup
allows you to delete audit log records without first archiving those records. If you specify --nobackup, you are asked to confirm the deletion of the target records before the operation is completed.
See Also
Commands: im viewauditlog, si purgeauditlog, si viewauditlog
Miscellaneous: options