Command Line Purge Examples

Note: The password or encrypted password is required when
com.tibco.mdm.clipassword.enable
property is set to true in the ConfigValues.xml
Purge History Older than 100 Days for All Enterprises
Specify in Command Line Expected Output
datacleanup.bat -o history -an ALL -d 100 -m = IDofSuperuser
Purge history older than 100 days for all enterprises.
Purge History Older than 100 Days for an Enterprise ID 239382
Specify in Command Line Expected Output
datacleanup.bat -o history -a 239382 -d 100 -m 20101
Purge history older than 100 days for an enterprise ID 239382.
Purge History Older than 100 Days for a Specific Enterprise
Specify in Command Line Expected Output
datacleanup.bat -o history -an MYENTP1 -d 100 -m 20101
Purge history older than 100 days, for enterprise = MYENTP1 and member ID=20101
Purge History Older than 100 Days and In-progress Event for All Enterprises
Specify in Command Line Expected Output
datacleanup.bat -o historyForce -an ALL -d 100 -m IDofSuperuser
Purge history older than 100 days, including the inprogress events for all the enterprises using an ID of the superuser, that is, tadmin.
Purge History for a Repository with start date and end date
Specify in Command Line Expected Output
datacleanup.bat -o history -a 35320 -sd "2016-01-14 00:00:00" -ed "2016-01-17 00:00:00" -m 35623 -pwd k
Purge history for an enterprise "35320" with start date "2016-01-14" and end date "2016-01-17" .
Purge an Event ID
Specify in Command Line Expected Output
datacleanup.bat -o event -an MYENTP1 -e 38990 -m 20101
Purge an event with an event ID 38990 for enterprise = MYENTP1 and member ID=20101.
Clean up Record Versions for a Repository
Specify in Command Line Expected Output
datacleanup.bat -o recordversions -r 68990 -d 90 -v 3 -m 20101
Cleans all record versions for a repository ID 68990 and member ID 20101 with cut off date as 90 days and at least 3 versions prior to cut off date.
Clean up Record Versions for a Repository within an Enterprise
Specify in Command Line Expected Output
datacleanup.bat -o recordversions -rn MYREPO -a 68990 -d 90 -v 3 -m 20101
Cleans all record versions for a repository= MYREPO and enterprise ID 68990 and member ID 20101 with cut off date as 90 days and at least 3 versions prior to cut off date.
Clean up Record Versions for All Repositories within an Enterprise
Specify in Command Line Expected Output
datacleanup.bat -o recordversions -a 68990 -rn ALL -d 90 -v 3 -m 20101
Cleans record versions for all repositories in an enterprise ID 68990 and member ID 20101 with cut off date as 90 days and at least 3 versions prior to cut off date.
Clean up Record Versions for All Repositories within All Enterprises
Specify in Command Line Expected Output
datacleanup.bat -o recordversions -an ALL -rn ALL -d 90 -v 3 -m = tadmin user id.
Cleans record versions for all repositories in all enterprise for using tadmin user ID with cut off date as 90 days and at least 3 versions prior to cut off date.
Purge all Records for a Repository with Start Date and End Date
Specify in Command Line Expected Output
datacleanup.bat -o recordversions -r 36000 -sd "2016-01-14 00:00:00" -ed "2016-01-17 00:00:00" -v 3 -m 35623 -pwd k
Purge record versions for repository ID "36000" with start date "2016-01-14" and end date "2016-01-17" for member ID "35623" and at least three versions prior to end date.
Purge All Records of a Repository
Specify in Command Line Expected Output
datacleanup.bat -o repository -r 29390 -m 20101
Purges all records of a repository ID 29390 and member ID 20101.
Purge All Records for a Repository with an Enterprise ID
Specify in Command Line Expected Output
datacleanup.bat -o repository -rn MYREPO -a 68990 -m 20101
Purges all records of a repository =MYREPO and enterprise ID 68990 and member ID 20101.
Purge All Records for a Repository within an Enterprise
Specify in Command Line Expected Output
datacleanup.bat -o repository -rn MYREPO -an MYENTP1 -m 20101
Purges all records of a repository =MYREPO and enterprise = MYENTP1 and member ID 20101.
Purge All Records for All Repositories of an Enterprise
Specify in Command Line Expected Output
datacleanup.bat -o repository -a 69390 -rn ALL -m 20101
Purges all records of all repositories and enterprise ID 69390 and member ID 20101.
Purge a Record with a Key
Specify in Command Line Expected Output
datacleanup.bat -o record -r 34921 -p 349390 -m 20101
Purges a record for repository ID 34921 with a key ID 349390 and member ID 20101.

When you purge a record with a record key, only the specified record is purged.

  • all the history for the specific record is removed.
  • the relationship between parent and child record is removed.
However, the child record is not removed until you explicitly remove it from the repository.
Note: To purge multiple record IDs in a single command, specify comma separated record IDs. For example,
datacleanup.bat -o record -r 34921 -p 349390,349440,339678 -m 20101
Clean up Metadata for a Repository within an Enterprise
Specify in Command Line Expected Output
datacleanup.bat -o metadata -a 68990 -rn MYREPO -m 20101
Cleans metadata for a repository = MYREPO and enterprise ID 68990 and member ID 20101.
Clean up Metadata for a Repository within an Enterprise
Specify in Command Line Expected Output
datacleanup.bat -o metadata -an MYENTP1 -rn MYREPO -m 20101 
Cleans metadata for a repository = MYREPO and enterprise = MYENTP1 and member ID 20101.
Clean up Metadata for All Repositories within an Enterprise
Specify in Command Line Expected Output
datacleanup.bat -o metadata -a 68990 -rn ALL -m 20101
Cleans metadata for all repositories ID 68990 and member ID 20101.
Clean up Metadata Version for a Repository
Specify in Command Line Expected Output
datacleanup.bat -o metadataversions -r 68990 -m 20101
Cleans metadata versions for a repository ID 68990 and member is 20101.
Clean up Metadata Version for All Repositories within an Enterprise
Specify in Command Line Expected Output
datacleanup.bat -o metadataversions -a 68990 -rn ALL -m 20101
Cleans metadata versions for all repositories of enterprise ID 68990 and member ID 20101.
Clean up Metadata for a Data Source
Specify in Command Line Expected Output
datacleanup.bat -o metadata -ds 34291 -a 34326 -m 20101
Cleans metadata for a datasource 34291 for enterprise ID 34326 and member is 20101.
Clean up Metadata for a Data Source for an Enterprise
Specify in Command Line Expected Output
datacleanup.bat -o metadata -dsn MYDS -an MYENTP1 -m 20101
Cleans metadata for a datasource named MYDS for enterprise = MYENTP1 and member ID 20101.
Clean up Metadata for a Data Source for an Enterprise
Specify in Command Line Expected Output
datacleanup.bat -o metadata -dsn MYDS -a 68890 -m 20101
Cleans metadata for a datasource named MYDS for enterprise ID 68990 and member ID 20101.
Clean up Metadata for All Data Sources for an Enterprise
Specify in Command Line Expected Output
datacleanup.bat -o metadata -a 68990 -dsn ALL -m 20101
Cleans metadata for all datasource for enterprise ID 68990 and member ID 20101.
Clean up Metadata for All Data Sources for an Enterprise
Specify in Command Line Expected Output
datacleanup.bat -o metadata -an MYENTP1 -dsn ALL -m 20101
Cleans metadata for all datasource for enterprise = MYENTP1 and member ID 20101.
Clean up Metadata for All Data Sources for All Enterprises
Specify in Command Line Expected Output
datacleanup.bat -o metadata -an ALL -dsn ALL -m = tadmin user id
Cleans metadata for all datasource for all enterprises and tadmin user ID.
Purge All Deleted Records From a Repository
Specify in Command Line Expected Output
datacleanup.bat -o deletedRecord -an TEST1 -mn admin -rn MYREPO  
Purges all deleted records with the enterprise name TEST1 with member name admin and repository name MYREPO.
Purge 10,000 Deleted Records From a Repository
Specify in Command Line Expected Output
datacleanup.bat -o deletedRecord -an TEST1 -mn admin -rn MYREPO   -l 10000
Purges 10,000 deleted records with the enterprise name TEST1 with member name admin and repository name MYREPO.
Purge Record Versions for a Repository and Retain Only the Golden Copy Version
Specify in Command Line Expected Output
datacleanup.bat -o recordversionsGoldenCopy -an TEST1 -mn admin -rn MYREPO
Purges record versions and only retains the Golden Copy version with the enterprise name TEST1 with member name admin and repository name MYREPO.
Incremental Purge
Specify in Command Line Expected Output
datacleanup.bat -o recordversions -an TEST1 -mn admin -rn MYREPO -d 90 -v 3 -ip Y -n JOBNAME1 
Purges all record versions with Incremental=true for the repository name MYREPO and enterprise name TEST1 and the user admin with cut off date as 90 days and at least 3 versions prior to cut off date and the job name as JOBNAME1.
Purge Policy
Specify in Command Line Expected Output
datacleanup.bat -o history -an TEST1 -mn admin -pp MEDIUM
Purges history older than 90 days, for enterprise = TEST1 (Purge history PurgePolicy MEDIUM means a 90 day retention).
Purge Multiple Records with Bulk Mode
Specify in Command Line Expected Output
datacleanup.bat -o record -r 36000 -uf "../../MyResource/my_test.csv" -m 20101 -b Y -pwd Abcdef1234 
Purges multiple records with repository ID "3600" in the my_text.csv file with member ID "20101". The file path is relative to the user's home.
Purge Multiple Records with Batch Mode
Specify in Command Line Expected Output
datacleanup.bat -o record -r 36561 -uf "../../MyResource/example.csv" -m 36483 -pwd Admin1234 
Purges multiple records with repository ID "36561" in the example.csv file with member ID "36483". The file path is relative to the user's home.