cancel
Showing results for 
Search instead for 
Did you mean: 

Purging deleted binaries

Florent_Guillau
World-Class Innovator
World-Class Innovator

After I removed some documents (and removed them from the trash), the contents of the binaries is still present on disk (in nxserver/data/binaries).

I can remove them using Admin Center > Repository Binaries > check Delete orphaned binaries > Mark orphaned binaries, but how can this be done programmatically?

1 ACCEPTED ANSWER

Florent_Guillau
World-Class Innovator
World-Class Innovator

This can be done using Java code that you can insert in an operation:

import org.nuxeo.ecm.core.storage.sql.management.RepositoryStatus;

RepositoryStatus status = new RepositoryStatus();
if (!status.isBinariesGCInProgress()) {
    status.gcBinaries(true);
}

View answer in original post

4 REPLIES 4

Florent_Guillau
World-Class Innovator
World-Class Innovator

This can be done using Java code that you can insert in an operation:

import org.nuxeo.ecm.core.storage.sql.management.RepositoryStatus;

RepositoryStatus status = new RepositoryStatus();
if (!status.isBinariesGCInProgress()) {
    status.gcBinaries(true);
}

It's possible to obtain the same effect with a Nuxeo Shell command?

You can put this in a Groovy script and execute it through the shell.

See [NXDOC/Delete+Documents][1]

Getting started

Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.