You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by Markus Angst <ma...@inventec.ch> on 2012/05/01 22:46:56 UTC

Deleting old document revisions

Hi,

Is there (still) no possibility to delete old revisions of documents (via GUI or
otherwise) or have I overlooked something?

If I have to do it by hand: is it enough to delete *.bak files and their
corresponding entries in the *.rcml file?

Thanks for any hints :-)

Markus Angst

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: Deleting old document revisions

Posted by Markus Angst <ma...@inventec.ch>.
On 17.05.2012 01:40, Rainer Schöpf wrote:
>> Well, then I could make roll off as much as I want by lowering the max. number
>> of revisions? Do you know where this number is configured?
> 
> It is hardwired into the class org.apache.lenya.cms.repository.SourceNodeRCML, 
> so it's not really configurable.
> 
> Rainer

Thank you for the info.

Markus Angst

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: Deleting old document revisions

Posted by Rainer Schöpf <ra...@gmx.net>.
On Wed, 16 May 2012 at 23:00 +0200, Markus Angst wrote:

 > On 08.05.2012 23:23, Richard Frovarp wrote:
 > > On 05/08/2012 03:26 PM, Markus Angst wrote:
 > >>>> Is there (still) no possibility to delete old revisions of documents (via GUI or
 > >>>> otherwise) or have I overlooked something?
 > >>>>
 > >>>> If I have to do it by hand: is it enough to delete *.bak files and their
 > >>>> corresponding entries in the *.rcml file?
 > >>>>
 > >>>> Thanks for any hints :-)
 > >>>>
 > >>>> Markus Angst
 > >>>>
 > >>> That's pretty much what you need to do. You can reduce the number of
 > >>> versions kept around. From my experience, you don't actually have to
 > >>> clean up the .rcml file. It will take care of that without throwing an
 > >>> error.
 > >>>
 > >>> Richard
 > >> This sounds promising, so I experimented a little bit. I did the following:
 > >>
 > >> - identified the UUID of a document under Site / Overview
 > >>    (document has 53 revisions)
 > >> - stopped Lenya
 > >> - deleted the oldest 42 revisions from content/authoring/<UUID>
 > >> - started Lenya
 > >> - navigated to Site / Revisions of the document
 > >> - the tab still shows 53 revisions
 > >> - click "View revision" on the topmost line (revision 53)
 > >>    -->  document opens (ok)
 > >> - click "View revision" on revision 40 (has been deleted)
 > >>    -->  got error: Could not read resource
 > >>        cocoon://modules/xhtml/xhtml.xml/<pubname>/authoring/<UUID>/de"
 > >>    (which is no surprise :-)
 > >>
 > >> What do I have to do to trigger the automatic .rcml cleanup? Lenya version is 2.0.4.
 > >>
 > >> Thanks!
 > >> Markus
 > >>
 > > 
 > > For what I was doing, I never really worried about it, or just let it 
 > > roll off by itself.
 > 
 > Well, then I could make roll off as much as I want by lowering the max. number
 > of revisions? Do you know where this number is configured?

It is hardwired into the class org.apache.lenya.cms.repository.SourceNodeRCML, 
so it's not really configurable.

  Rainer

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: Deleting old document revisions

Posted by Markus Angst <ma...@inventec.ch>.
On 08.05.2012 23:23, Richard Frovarp wrote:
> On 05/08/2012 03:26 PM, Markus Angst wrote:
>>>> Is there (still) no possibility to delete old revisions of documents (via GUI or
>>>> otherwise) or have I overlooked something?
>>>>
>>>> If I have to do it by hand: is it enough to delete *.bak files and their
>>>> corresponding entries in the *.rcml file?
>>>>
>>>> Thanks for any hints :-)
>>>>
>>>> Markus Angst
>>>>
>>> That's pretty much what you need to do. You can reduce the number of
>>> versions kept around. From my experience, you don't actually have to
>>> clean up the .rcml file. It will take care of that without throwing an
>>> error.
>>>
>>> Richard
>> This sounds promising, so I experimented a little bit. I did the following:
>>
>> - identified the UUID of a document under Site / Overview
>>    (document has 53 revisions)
>> - stopped Lenya
>> - deleted the oldest 42 revisions from content/authoring/<UUID>
>> - started Lenya
>> - navigated to Site / Revisions of the document
>> - the tab still shows 53 revisions
>> - click "View revision" on the topmost line (revision 53)
>>    -->  document opens (ok)
>> - click "View revision" on revision 40 (has been deleted)
>>    -->  got error: Could not read resource
>>        cocoon://modules/xhtml/xhtml.xml/<pubname>/authoring/<UUID>/de"
>>    (which is no surprise :-)
>>
>> What do I have to do to trigger the automatic .rcml cleanup? Lenya version is 2.0.4.
>>
>> Thanks!
>> Markus
>>
> 
> For what I was doing, I never really worried about it, or just let it 
> roll off by itself.

Well, then I could make roll off as much as I want by lowering the max. number
of revisions? Do you know where this number is configured?

> I guess it kind of depends on what your usecase for doing this is.

To make a copy of a production publication (with lots of revisions) for a test
server.

Thanks
Markus

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: Deleting old document revisions

Posted by Richard Frovarp <rf...@apache.org>.
On 05/08/2012 03:26 PM, Markus Angst wrote:
>>> Is there (still) no possibility to delete old revisions of documents (via GUI or
>>> otherwise) or have I overlooked something?
>>>
>>> If I have to do it by hand: is it enough to delete *.bak files and their
>>> corresponding entries in the *.rcml file?
>>>
>>> Thanks for any hints :-)
>>>
>>> Markus Angst
>>>
>> That's pretty much what you need to do. You can reduce the number of
>> versions kept around. From my experience, you don't actually have to
>> clean up the .rcml file. It will take care of that without throwing an
>> error.
>>
>> Richard
> This sounds promising, so I experimented a little bit. I did the following:
>
> - identified the UUID of a document under Site / Overview
>    (document has 53 revisions)
> - stopped Lenya
> - deleted the oldest 42 revisions from content/authoring/<UUID>
> - started Lenya
> - navigated to Site / Revisions of the document
> - the tab still shows 53 revisions
> - click "View revision" on the topmost line (revision 53)
>    -->  document opens (ok)
> - click "View revision" on revision 40 (has been deleted)
>    -->  got error: Could not read resource
>        cocoon://modules/xhtml/xhtml.xml/<pubname>/authoring/<UUID>/de"
>    (which is no surprise :-)
>
> What do I have to do to trigger the automatic .rcml cleanup? Lenya version is 2.0.4.
>
> Thanks!
> Markus
>

For what I was doing, I never really worried about it, or just let it 
roll off by itself.

My primary reason for deleting old revisions prior to them expiring was 
the number of times binary data creates a new revision before it ends up 
in Live. We had a bunch of teachers uploading 8 MB photos that ended up 
replicating themselves at least 4 times on the system by the time it got 
to Live, and chewing up the disk space. So I just deleted the first 
revisions to free up disk. I did that with the system running.

I guess it kind of depends on what your usecase for doing this is.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: Deleting old document revisions

Posted by Markus Angst <ma...@inventec.ch>.
>> Is there (still) no possibility to delete old revisions of documents (via GUI or
>> otherwise) or have I overlooked something?
>>
>> If I have to do it by hand: is it enough to delete *.bak files and their
>> corresponding entries in the *.rcml file?
>>
>> Thanks for any hints :-)
>>
>> Markus Angst
>>
> 
> That's pretty much what you need to do. You can reduce the number of 
> versions kept around. From my experience, you don't actually have to 
> clean up the .rcml file. It will take care of that without throwing an 
> error.
> 
> Richard

This sounds promising, so I experimented a little bit. I did the following:

- identified the UUID of a document under Site / Overview
  (document has 53 revisions)
- stopped Lenya
- deleted the oldest 42 revisions from content/authoring/<UUID>
- started Lenya
- navigated to Site / Revisions of the document
- the tab still shows 53 revisions
- click "View revision" on the topmost line (revision 53)
  --> document opens (ok)
- click "View revision" on revision 40 (has been deleted)
  --> got error: Could not read resource
      cocoon://modules/xhtml/xhtml.xml/<pubname>/authoring/<UUID>/de"
  (which is no surprise :-)

What do I have to do to trigger the automatic .rcml cleanup? Lenya version is 2.0.4.

Thanks!
Markus

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: Deleting old document revisions

Posted by Richard Frovarp <rf...@apache.org>.
On 05/01/2012 03:46 PM, Markus Angst wrote:
> Hi,
>
> Is there (still) no possibility to delete old revisions of documents (via GUI or
> otherwise) or have I overlooked something?
>
> If I have to do it by hand: is it enough to delete *.bak files and their
> corresponding entries in the *.rcml file?
>
> Thanks for any hints :-)
>
> Markus Angst
>

That's pretty much what you need to do. You can reduce the number of 
versions kept around. From my experience, you don't actually have to 
clean up the .rcml file. It will take care of that without throwing an 
error.

Richard

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org