[opencms-dev] how to find unused/not linked/orphan files in vfs - pls help

Stephan Schrader zstephanz at gmail.com
Tue Feb 27 09:13:41 CET 2018


Hi,

you can use: *CmsObject.getRelationsForResource(CmsResource resource,
CmsRelationFilter filter)* with *CmsRelationFilter.SOURCE* as parameter. If
the result is empty, no other resource references the given resource.

Stephan



2018-02-23 17:59 GMT+01:00 always.work.in.progress always.work.in.progress <
always.work.in.progress at gmail.com>:

> hi all...
> i am using Opencms 10.0.0/mysql set up in multisite environment (apache +
> mod proxy)
> i manage some large web sites plenty of xml contents/pages that link to
> many internal uploaded pdf/images files/other filetypes etc..
> often these files that are not needed anymore, are unlinked from related
> xml contents, but unfortunately they are not deleted from the vfs workplace
> and so become "forgotten".. :(
>
> Is there an internal workplace jsp script or function in order to find
> these "orphan files" ?
> i mean files that are present in vfs but not anymore linked from any xml
> contents page;
>
> these files waste db blob space and the mysql database under opencms is
> growing in size and getting more and more big..
>
> i tried to look for a way to do that but i've never found a similar
> function/method..
> it would be really useful in order to locate these unused  files and
> delete them.
>
> thanks in advance for your reply.
>
> bye.
>
>
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20180227/2ea717ee/attachment.htm>


More information about the opencms-dev mailing list