Chapter 14. Administering and Maintaining the System

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 your personal or departmental information
  • Back up your data on a regular basis for storage and retrieval
  • Perform general maintenance tasks, such as examining log files
  • Set up replication for high availability
  • Upgrade your Alfresco application to newer versions
  • Control system usage, by using a user quota system
  • Manage a multi-tenant system
  • Enable full auditing of user and system activities

Exporting and importing content

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.

Alfresco Content Package (ACP)

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.

Exporting and importing space content

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 current space and all of the sub spaces
  • All of the documents (files, images, HTML/XML content, custom content, all versions) within the space and its sub spaces
  • Complete metadata (aspects, audit, and versions) associated with the documents
  • Business rules set on the spaces
  • Invited users to a space or content

Export of a department space using Alfresco Explorer

The process to export a space within Alfresco Explorer is as follows:

  1. Select a specific space to export (say, Sales Department, in your sample Intranet application).
  2. Select the More Actions | View Details link to view the Details page of the space.
  3. Select the Export action to launch the Export dialog, as shown in the following screenshot:
    Export of a department space using Alfresco Explorer
  4. Fill in the export options, as follows:
    • Package name: The name of the resulting export ACP file.
    • Destination: The location within the repository to place the ACP file.
    • Include children: If selected, then it will also export sub folders.
    • Include this space: If selected, then it exports the selected folder, otherwise it only exports the children.
    • Run export in background: If selected, then the export will take place in the background, eventually creating the export ACP file.
  5. Click on the OK button.

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.

Importing a department space using Alfresco Explorer

The process for importing an ACP file within Alfresco Explorer is as follows:

  1. Select a space to import the information into.
  2. Select the More Actions | View Details link to view the Details page of the space.
  3. Select the Import action to launch the Import dialog, as shown in the following screenshot:
    Importing a department space using Alfresco Explorer
  4. Fill in the import options, as follows:
    • Location: Select an ACP file to import from the filesystem, by clicking on the Browse button.
    • Run in background: If selected, then the import will take place in the background, eventually creating all of the folders and files held in the ACP file.
  5. Click on the OK button.

On success, the information previously exported to the ACP file will now reside in the destination space.

Using business rules to import data

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.

Using business rules to import data

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.

Using command line tools

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

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 progress

For 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

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.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset