Maintaining and upgrading a system is equally as important as implementing it. A well‑maintained system will give the highest return on investments. This chapter provides a high level overview of administering and maintaining your Alfresco implementation. It includes information about backing up your valuable content, upgrading your system to newer versions, enabling a full audit trail, and setting up a multi-tenant system configuration. You will also find general maintenance tips, such as maintaining log files and periodically updating your admin password.
By the end of this chapter, you will have learned how to:
Export and import functions are useful in order to bulk extract and load the personal, departmental, or team information from one location to another location within the repository, or to some other repository. In some situations, you can use this to integrate with third-party systems. For example, you can send the exported content from the Alfresco repository to another Content Management System, or an internal system. Similarly, you can package external content, and import it into the Alfresco repository.
The Alfresco Explorer has web-based utilities for exporting and importing content using an Alfresco Content Package (ACP). An ACP is a single file (with an extension of .acp
) that bundles together the metadata, content files, business rules, and the security settings for content.
The process for export and import is simple. Export produces one or more ACP files, which hold the exported information. As with all of the files, you can place them somewhere secure, or transfer them using mechanisms such as email, FTP, and so on. Security settings only allow the export of those items that are readable by the user, performing the export.
The import of an ACP file is the reverse of an export. The information held in the ACP file is placed into the repository location chosen at the time of. By default, the import process creates a copy of the ACP-held information.
An ACP file is simply a ZIP archive whose structure is as follows:
/<packagename>.xml /<packagename>/ contentNNN.pdf contentNNN.txt ...
The packagename
is assigned on export. The XML file conforms to the export and import view schema, which describes the transported nodes in terms of their types, aspects, properties, associations, and permissions. Content properties are handled specifically where the binary content of the property is held in a separate file, under the packagename
folder of the ZIP archive, and the XML contains a reference to the file.
While the repository provides several different ways to create an ACP file (export), it is also possible to create one manually. This is very useful for system‑to‑system integration.
Any Alfresco user may perform an export and import of folders and files that they have access to. You can choose any space (personal or departmental) to export.
The scope of information to export is configurable, but typically involves specifying the location within the repository to export. For example, if you choose to export content in one specific space (say Company Home > Intranet > Finance Department), then the exported data includes:
The process to export a space within Alfresco Explorer is as follows:
On success, the destination location will contain the ACP file. At this point, the ACP file can be saved to a local filesystem for a safe backup or for transfer via email.
The process for importing an ACP file within Alfresco Explorer is as follows:
On success, the information previously exported to the ACP file will now reside in the destination space.
By using Alfresco's rules and actions, it is possible to set up an automated import, whereby an ACP file is automatically imported into the repository when it is placed into a designated space.
For example, the following rule (shown in the upcoming screenshot) is defined against an Import Drop Zone space, wherein, if the incoming file name property matches *.acp
, then the ACP file's contents are imported into the Import Content space.
When an ACP file is placed into the Import Drop Zone space, the import process is automatically kicked off, and the items held in the ACP file are imported into the Imported Content space.
An important point to remember is that the import will be initiated regardless of how the ACP file was placed into the folder. For example, the import will initiate if the ACP file was placed there via CIFS, FTP, WebDAV, Alfresco Explorer, or API. This is particularly powerful for system-to-system data integration.
The Alfresco export and import tools are developed directly against the Alfresco repository foundation APIs. This means that they can be executed stand-alone with an embedded repository. To perform an export and import operation via these tools requires the configuration of the, to ensure that the appropriate storage locations (for example, database and file system folder) are used.
The export tool is useful when you want to extract certain data from the Alfresco repository, without using the Alfresco Explorer application. The Java class file for the export tool is located at org.alfresco.tools.Export
.
Because the Alfresco repository imposes strict security policies, you need to provide your authentication credentials (username and password), no matter how you access the repository.
The usage of the tool is as follows:
Usage: export -user <username> -pwd <password> -s[tore] <store> [options] <packagename>
Where,
<username>
is your login user ID<password>
is your password<store>
is the store to extract from, which is in the scheme://store_name
format<packagename>
is the filename to export to (with or without extension)Other important [options]
include:
-path
: the path within the store to extract from (the default is "/", which is the root folder)-nochildren
: does not extract children-overwrite
: forces the overwrite of an existing export package if it already exists-quiet
: does not display any messages during export-verbose
: reports the export progressFor example, to export the Intranet space from the repository, you would use the following command:
export -user admin -pwd admin -s workspace://SpacesStore –path/companyhome -verbose Intranet.acp
The import tool is useful when you want to upload certain data into the Alfresco repository, without using the Alfresco Explorer application. The Java class file for the import tool is located at org.alfresco.tools.import
.
The usage of the tool is as follows:
Usage: import -user <username> -pwd <password> -s[tore] <store> [options] <packagename>
The [options]
are as follows:
-path
: the path to import into, within the store (this default is "/", which is the root folder) -verbose
: reports the import progress-uuidBinding
: CREATE_NEW
, REMOVE_EXISTING
, REPLACE_EXISTING
, UPDATE_EXISTING
, THROW_ON_COLLISION
(the default is CREATE_NEW
)For example, to import the intranet space into the repository, you would use the following command:
import -user admin -pwd admin -s workspace://SpacesStore –path /companyhome -verbose –uuidBinding REPLACE_EXISTING Intranet.acp
It is possible to import from an ACP file or just an XML file. Importing just an XML file is useful if you want to import nodes without the associated binary content.