10

I am trying to schedule the purgetool to run through batch scheduling.

When I run the tool through the UI, everything works fine; however when I run the tool from the command line with the command PurgeTool.exe purge.xml /Purge the versions of items are not getting deleted but the workflow history is cleared.

Can you please help me resolve this issue?

<?xml version="1.0"?>
<XML>
    <Settings>
        <LoggingDirectory>C:\log</LoggingDirectory>
        <LogFilePrefix>Purge_</LogFilePrefix>
        <Items Purge="true">
            <Keep>5</Keep>
            <Recursive>1</Recursive>
        </Items>
        <ProcessHistories Purge="true" Before="2013-07-03"> </ProcessHistories>
        <PublishTransactions Purge="true" Before="2013-07-03"> </PublishTransactions>
    </Settings>
    <Scan>
        <Entry URI="tcm:3-123-2" Purge="True"><![CDATA[TestFolder]]></Entry>
    </Scan>
</XML>
  • Could you add your purge.xml – Chris Summers Oct 31 '13 at 23:54
  • When did you last run the PurgeTool? We have seen challenges with PurgeTool cases with the combination when a) large data sets (publications and Items) b) haven't run for quite some time and trying to run first time. Unfortunately, there is no quick fix or workaround to this. I would suggest opening support ticket. – Ram G Nov 1 '13 at 14:39
  • @RamG This is the first time that we are trying to run the PurgeTool from commandline. To answer your questions: a. large data set: I limited the folders to scan to reduce amount of data b: yes, trying to run first time. Strange thing here is purge tool works properly when ran from GUI however it is having problem only with commandline. – Hiren Kaku Nov 1 '13 at 16:30
  • Ok. I am assuming that you are running he tool with Administrator privelleges (Run As Admin... ). Do you see any error in event log? Try running with impersonated user in Tridion config something like this Runas /user:<tridionimpersonateduser>" "PurgeTool.exe purge.xml /Purge" – Ram G Nov 1 '13 at 18:15
  • @RamG Yes, I am administrator and tried runas Administrator also. Nothing in event log. I even tried runas user option however none of the option worked. – Hiren Kaku Nov 1 '13 at 19:44
4

Tridion support confirmed that there is a bug with PurgeTool while it is ran from commandline. So now working on writing custom code to implement the version purge. Thanks everybody for your responses.

| improve this answer | |
3

Not sure if it still holds true for 2011, but I had similar issues in SDL Tridion 2009. Running Purge tool with command line with proper configuration XML and it does not behave as it should and it was a known bug then (not sure if it has been fixed in 2011).

You can try following:

  • Do not manually edit the purge.xml, but use the GUI (which you said is working for you) and save the xml from the same working GUI configuration
  • Check the user with which you are trying to execute the command line and command to run purge tool have valid access rights in Tridion
  • In the above xml try changing (or removing rather) setting for recursive and try for a flat hierarchy, if it works try with <Recursive>true</Recursive>
  • If none of the above works, check with SDL Tridion support if there is any known bug in Purge Tool while running from command line
| improve this answer | |
  • Hi Pankaj, Thanks a lot for your valuable inputs. I have already tried option 1 and it did not work. I am system admin in tridion so not assuming it to be access issue. I will try 3rd option, let's see. – Hiren Kaku Nov 1 '13 at 5:58
  • 3rd option also did not work – Hiren Kaku Nov 1 '13 at 6:03
  • 2
    Did you try open your command window on the CMS server with "Run As Administrator" option and then execute the command – Pankaj Gaur Nov 1 '13 at 6:07
  • Run As Administrator shouldn't be necessary, as what the purge tool does is entirely based on Tridion actions and relies on your access rights in Tridion – Dominic Cronin Nov 1 '13 at 8:07
  • @PankajGaur I tried "Run As Administrator" option also however still it did not work. – Hiren Kaku Nov 1 '13 at 16:31
1

Used approach mentioned in the link: http://vvlasenko.blogspot.com/2011/12/how-to-purge-old-versions.html

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.