cancel
Showing results for 
Search instead for 
Did you mean: 

workspace-SpacesStore & archive-SpacesStore

schusr
Champ in-the-making
Champ in-the-making
My Alfresco 4.0 mostly default install is creating files  /workspace-SpacesStore and /archive-SpacesStore spontaneously for some unknown reason.

What is this for?

Can I turn it off or change the directory from root to somewhere else?


[root@alfresco workspace-SpacesStore]# ls -l
total 84
drwxr-xr-x 2 root root 4096 Dec 31 02:00 snapshot.20111231020001
drwxr-xr-x 2 root root 4096 Jan  1 02:00 snapshot.20120101020001
drwxr-xr-x 2 root root 4096 Jan  2 02:00 snapshot.20120102020001
drwxr-xr-x 2 root root 4096 Jan  5 02:00 snapshot.20120105020001
drwxr-xr-x 2 root root 4096 Jan  7 02:00 snapshot.20120107020001
drwxr-xr-x 2 root root 4096 Jan  9 02:00 snapshot.20120109020001
drwxr-xr-x 2 root root 4096 Jan 11 02:00 snapshot.20120111020001
drwxr-xr-x 2 root root 4096 Jan 12 02:00 snapshot.20120112020001
drwxr-xr-x 2 root root 4096 Jan 13 02:00 snapshot.20120113020001
drwxr-xr-x 2 root root 4096 Jan 14 02:00 snapshot.20120114020001
drwxr-xr-x 2 root root 4096 Jan 16 02:00 snapshot.20120116020001
drwxr-xr-x 2 root root 4096 Jan 17 02:00 snapshot.20120117020001
drwxr-xr-x 2 root root 4096 Jan 18 02:00 snapshot.20120118020001
drwxr-xr-x 2 root root 4096 Jan 19 02:00 snapshot.20120119020001
drwxr-xr-x 2 root root 4096 Jan 20 02:00 snapshot.20120120020001
drwxr-xr-x 2 root root 4096 Jan 21 02:00 snapshot.20120121020001
drwxr-xr-x 2 root root 4096 Jan 22 02:00 snapshot.20120122020001
drwxr-xr-x 2 root root 4096 Jan 23 02:00 snapshot.20120123020001
drwxr-xr-x 2 root root 4096 Jan 24 02:00 snapshot.20120124020001
drwxr-xr-x 2 root root 4096 Feb  1 02:00 snapshot.20120201020001
drwxr-xr-x 2 root root 4096 Feb  3 02:00 snapshot.20120203020001



[root@alfresco archive-SpacesStore]# ls -l
total 56
drwxr-xr-x 2 root root 4096 Feb 21 04:00 snapshot.20120221040000
drwxr-xr-x 2 root root 4096 Feb 22 04:00 snapshot.20120222040000
drwxr-xr-x 2 root root 4096 Feb 24 04:00 snapshot.20120224040000
drwxr-xr-x 2 root root 4096 Feb 25 04:00 snapshot.20120225040001
drwxr-xr-x 2 root root 4096 Feb 27 04:00 snapshot.20120227040001
drwxr-xr-x 2 root root 4096 Feb 28 04:00 snapshot.20120228040001
drwxr-xr-x 2 root root 4096 Feb 29 04:00 snapshot.20120229040000
drwxr-xr-x 2 root root 4096 Mar  1 04:00 snapshot.20120301040000
drwxr-xr-x 2 root root 4096 Mar  2 04:00 snapshot.20120302040001
drwxr-xr-x 2 root root 4096 Mar  3 04:00 snapshot.20120303040000
drwxr-xr-x 2 root root 4096 Mar  4 04:00 snapshot.20120304040000
drwxr-xr-x 2 root root 4096 Mar  5 04:00 snapshot.20120305040000
drwxr-xr-x 2 root root 4096 Mar  6 04:00 snapshot.20120306040000
drwxr-xr-x 2 root root 4096 Mar  7 04:00 snapshot.20120307040000
9 REPLIES 9

mrogers
Star Contributor
Star Contributor
it's your solr index.

You can configure where it goes in your alfresco-global.properties.   Normally it will be under your alf_data folder.
Its very strange that it is in root.

schusr
Champ in-the-making
Champ in-the-making
You mean this line

dir.root=/alfresco/alfresco-4.0.c/alf_data

I deleted the /workspace-SpacesStore because the time stamps were old and needed root space.


[root@alfresco /]# find / -name "snapshot*" -print
/root/workspace-SpacesStore/snapshot.20120131020002
/root/workspace-SpacesStore/snapshot.20120128020001
/root/workspace-SpacesStore/snapshot.20120104020002
/root/workspace-SpacesStore/snapshot.20120129020002
/root/archive-SpacesStore/snapshot.20120129040002
/root/archive-SpacesStore/snapshot.20120128040002
/root/archive-SpacesStore/snapshot.20120131040026
/alfresco/alfresco-4.0.c/postgresql/include/server/utils/snapshot.h
/alfresco/alfresco-4.0.c/tomcat/webapps/alfresco/jsp/wcm/snapshot-sandbox.jsp
/archive-SpacesStore/snapshot.20120304040000
/archive-SpacesStore/snapshot.20120305040000
/archive-SpacesStore/snapshot.20120224040000
/archive-SpacesStore/snapshot.20120307040000
/archive-SpacesStore/snapshot.20120222040000
/archive-SpacesStore/snapshot.20120303040000
/archive-SpacesStore/snapshot.20120221040000
/archive-SpacesStore/snapshot.20120229040000
/archive-SpacesStore/snapshot.20120301040000
/archive-SpacesStore/snapshot.20120306040000
/archive-SpacesStore/snapshot.20120228040001
/archive-SpacesStore/snapshot.20120225040001
/archive-SpacesStore/snapshot.20120302040001
/archive-SpacesStore/snapshot.20120227040001
/dev/snapshot

webfrank
Champ in-the-making
Champ in-the-making
Hi,
   I've got the same problem, I found workspace and archive SpacesStore in /root dir filling up all available space.
I stopped Alfresco, moved those dir in /opt/alfresco/alf_data and restarted but them are being created again in /root.

In alfresco-global.properties I have:

dir.root=/opt/alfresco-4.0.c/alf_data

### Solr indexing ###
index.subsystem.name=solr
dir.keystore=${dir.root}/keystore
solr.port.ssl=8443

shmoula
Champ in-the-making
Champ in-the-making
Hi, any progress with disabling this "feature"? I'm using lucene as my indexing service, but those directories keeps creating as well. How can I get rid of them?

shmoula
Champ in-the-making
Champ in-the-making
Ok, solved! If you want to turn off that "feature", you have to change solr config - those settings are in directory classes/alfresco/subsystems/Search/solr/. Triggers for cron are in solr-backup-context.xml, I just commented them out; and settings are in properties around :-). (backups run at 2AM and 4AM every night). Weird thing is - why is solr doing this in prebundled alfresco also in case, when index.subsystem.name=lucene is set? In my svn build i havent those problems.

dhd
Champ in-the-making
Champ in-the-making
Hi,

I think I found another way to turn off the solr cron snapshots, you can put

solr.backup.alfresco.cronExpression=* * * * * ? 2099
solr.backup.archive.cronExpression=* * * * * ? 2099

in your alfresco-global.properties

Overriding the tomcat6/webapps/alfresco/WEB-INF/classes/alfresco/subsystems/Search/solr/solr-backup.properties by placing files in tomcat6/shared/classes/alfresco/extension/subsystems/Search/solr has not seemed to work for me, although I tried hard.

I've also had a hard time trying to get the snapshots written to my preferred location in terms of ${dir.root}.  No doubt I'm missing something … but for the moment I'm turning this off and trying to backup the solr indexes another way.

shazada
Star Contributor
Star Contributor
Hi I think I found a better solution.

When connected via JMX to an Alfresco 4 enterprise, is saw the following properties:

solr.backup.alfresco.numberToKeep=3
solr.backup.alfresco.remoteBackupLocation=${dir.root}/solrBackup/alfresco
solr.backup.alfresco.cronExpression=0 0 2 * * ?

and for the Archive
solr.backup.archive.numberToKeep=3
solr.backup.archive.remoteBackupLocation=${dir.root}/solrBackup/archive
solr.backup.archive.cronExpression=0 0 2 * * ?

Hence, one can limit the numberToKeep to 1 to just keep 1 backup and place it on a remote folder.

btw, these properties can be set in alfresco-global.properties

But that's not all Smiley Happy, we need to do a bit more to use this Enterprise code in the Community:

We need to override the spring bean search.alfrescoCoreSolrBackupClient in solr-backup-context.xml
So this is a snippet from the Enterprise version:
<bean id="search.alfrescoCoreSolrBackupClient" class="org.alfresco.repo.search.impl.solr.SolrBackupClient" >
        <property name="jobLockService">
            <ref bean="jobLockService" />
        </property>
        <property name="remoteBackupLocation">
            <value>${solr.backup.alfresco.remoteBackupLocation}</value>
        </property>
        <property name="numberToKeep">
            <value>${solr.backup.alfresco.numberToKeep}</value>
        </property>
        <property name="core">
            <value>alfresco</value>
        </property>
        <property name="solrAdminClient">
            <ref bean="solrAdminClient" />
        </property>
    </bean>

And we need to add a getter/setter in org.alfresco.repo.search.impl.solr.SolrBackupClient as int to read the numberToKeep value.
Finally modify the executeImpl() method, which should look like the following:
private void executeImpl(AtomicBoolean running)
    {
        if((remoteBackupLocation == null) || (remoteBackupLocation.length() == 0))
        {
            if(logger.isInfoEnabled())
            {
                logger.info("Back up of SOLR core skipped - no remote backup localtion set for: "+core);
            }
        }
       
        try
        {
            ModifiableSolrParams params = new ModifiableSolrParams();
            params.set("qt", "/"+core+"/replication");
            params.set("command", "backup");
            params.set("location", remoteBackupLocation);
            params.set("numberToKeep", numberToKeep);
           
            QueryResponse response = solrAdminClient.query(params);
           
           
            if(logger.isInfoEnabled())
            {
                logger.info("Back up of SOLR core completed: "+core);
            }
   
        }
        catch(SolrServerException e)
        {
            throw new AlfrescoRuntimeException("Bakup for core "+core+ " feailed …. ", e);
        }

    }


I guess one can hack around this, by just changing solr.backup.alfresco.remoteBackupLocation=${dir.root}/solrBackup/alfresco into
solr.backup.alfresco.remoteBackupLocation=${dir.root}/solrBackup/alfresco&numberToKeep=3

I haven't tested this, in theory it should work  :mrgreen:

lux209
Champ in-the-making
Champ in-the-making
Hi,

Can I safely remove some old snapshot? Do I have to tell alfresco that those snapshot are deleted?

I didn't really understood the need of those snapshots and how to use them? Is there any doc available?

FYI: A bug has been raised about that, it's apparently solved in the 4.0.1 version (enterprise version I think). https://issues.alfresco.com/jira/browse/ALF-12307

shazada
Star Contributor
Star Contributor
Yep that's possible. You could also write a script which checks on the number of backups(snapshots) and deletes the older ones.
Getting started

Tags


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.