get the tool
http://code.google.com/p/alfresco-bulk-filesystem-import/downloads/list
use the alfresco module managing tool
http://wiki.alfresco.com/wiki/Module_Management_Tool
Installation Steps
The following steps describe how to download and install the Alfresco Bulk Filesystem Import Tool:
- Download the latest AMP file containing the tool from here
- Shutdown your Alfresco instance (use the .sh inside your alfreso install folder)
- Make a backup of the original alfresco.war file. On Tomcat, this is located in ${ALFRESCO_HOME}/tomcat/webapps
- Use the Alfresco Module Management Tool to install the AMP file obtained in step 1
- Restart Alfresco, watching the log carefully for errors
Running the MMT
Run the following command:
java -jar alfresco-mmt-2.1.jar [args]
It is compatible with V2.0 WAR files and above.
MMT Commands
The MMT has a number of commands. Details of these are outlined below:
install
usage: install <AMPFileLocation> <WARFileLocation> [options]
valid options:
-verbose : enable verbose output
-directory : indicates that the amp file location specified is a directory.
All amp files found in the directory and its sub directories are installed.
-force : forces installation of AMP regardless of currently installed module version
-preview : previews installation of AMP without modifying WAR file
-nobackup : indicates that no backup should be made of the WAR
Stop Alfresco
:~/alfresco-4.0.d-1$ ./ctlscript.sh stop
/home/ardian/alfresco-4.0.d-1/apache-tomcat/scripts/ctl.sh : tomcat not running
/home/ardian/alfresco-4.0.d-1/mysql/scripts/ctl.sh : mysql stopped
Check if alfresco is running
ardian@arbk-share:~/alfresco-4.0.d-1$ ps -ef | grep alfresco
ardian 18815 18168 0 11:06 pts/2 00:00:00 grep --color=auto alfresco
locate where the alfresco-mmt-2.1.jar is usually its under alfresco install dir in the bin/
For me its /alfresco-4.0.d-1/apps/alfresco
java -jar alfresco-mmt.jar install ~/alfresco-bulk-filesystem-import-1.1-ALF40.amp ~/alfresco-4.0.d-1/apache-tomcat/webapps/alfresco.war
list the modules
java -jar alfresco-mmt.jar list ~/alfresco-4.0.d-1/apache-tomcat/webapps/alfresco.war
Module 'org.alfresco.extension.alfresco-bulk-filesystem-import' installed in '/home/ardian/alfresco-4.0.d-1/apache-tomcat/webapps/alfresco.war'
- Title: Alfresco Bulk Filesystem Import v1.1 (for Alfresco v4.0)
- Version: 1.1
- Install Date: Wed Jul 25 11:18:19 CEST 2012
- Description: Alfresco Bulk Filesystem Import tool. Provides high performance bulk loading of content from the server's filesystem into Alfresco.
If you run Alfresco on Linux turn of CIFS: add this
- CODE: SELECT ALL
cifs.enabled=false
to alfresco-global.properties.
export BULK=alfresco-bulk-filesystem-import-1.0.amp
java -jar $ALFRESCO_HOME/bin/alfresco-mmt.jar install $ALFRESCO_HOME/amps/$BULK $ALFRESCO_HOME/tomcat/webapps/alfresco.war -force -verbose
$ apply_amps.sh
visit