Description
Remove spiked items from the database.
Parameters (* denotes an optional parameter)
Ids*
An optional comma-separated list of database ids of the objects to purge. If specified, it overrides all other parameters used to determine which objects to purge.
Codes*
An optional comma-separated list of the spike codes to purge. If not present, all spike code types are purged. Allowed values are: normal, black, auto.
Types*
An optional comma-separated list of the object types to purge. If not specified, all object types meeting the defined criteria are purged.
Since*
An optional time span, specified as days.hours:minutes, e.g., 4:30 specifies 4 hours and 30 minutes, 2.06:00 specifies 2 days and 6 hours.
When this parameter is present, only the objects that were spiked before the specified number of days.hours:minutes will be purged. If not specified, only objects spiked more than 365 days ago will be purged.
NOTE: a '.' separates the days and hours, and a ':' separates hours and minutes.
List*
If present, the command will only list the objects to be purged, not actually purge them.
By*
An optional integer that specifies the number of objects to purge together in a single operation. A higher value decreases the time it takes to complete the operation, and increases the time that locks are put on the database. The default value is 50.
Examples with do.ashx
1/ Return a list of the objects that were spiked more than 60 days ago, without purging them.
http://demo.teradp.com/Tark4/do.ashx?Cmd=purge&since=60.00:00&list=
2/ Purge all image objects that were spiked more than 30 days ago.
http://demo.teradp.com/Tark4/do.ashx?Cmd=purge&type=image&since=30.00:00
Examples with cmd4 and srv4
1/ Remove all spiked (possible time-out problems)
cmd4 purge -since 00:00
Note: this may go in timeout if the number of the items to purge is too high and timeout too low.
2/ Remove all spiked (no time-out problems)
srv4 cleanup -purge 00:01
Note: you can't specify 00.00, so the least time interval is 1 second.
3/ Purge pages, also if published to different publishing destinations: the below command unrefs page that will get purged from pubDest on the same cmd line.
Cmd4.exe spike -conditions "e:\Tera\GN4\Cond\mycond.xml" -extend "master.editionRef,page.editionRef,extDoc.editionRef,pageLayer.pages" –unref pubDest.objs –recurse
Note: e:\Tera\GN4\Cond\mycond.xml defines the search condition.
4/ Purge all, but the objects that have a null gn_PurgeTime.
cmd4 purge –auto
5/ Purge specific:
cmd4 purge -ids 1949,1838 -auto -since 20.06:00
“auto” and “since” are ignored, the purge operation is applied only for the object with id 1949,1838 (if exists)
See also