In earlier post I have explained about multi-tenancy in alfresco. How to establish the multi-tenant environment in Alfresco and how it support multi-tenancy. Here I will describe how a tenant administrator can export and import spaces and tenants using the Tenant Administration Console.
Once a tenant is created and enabled, the tenant administrator can log into Explorer and access the Administration Console within the context of their tenant domain. Repository export does not apply to certain areas, such as in-flight workflows. A repository import must be into the same version of Alfresco from which the export was performed.
- Log in to Alfresco as the admin user and access Tenant Admin console
- Use the export feature to export a tenant:
export <tenant domain> <destination directory>
Ex. export testmutlit.com ExportTenant
NOTE: ExportTenant is a directory you need to create under your alfresco installation if it is not created then you will get error as follow
Ex. export testmutlit.com test
In this case there no directory called test under the alfresco installation available so it throws error as shown in given image.
Once successfully exported you can see various ACP files under the directory in which you have exported in our case it is ExportTenant
This exports the tenant to a set of repository export files in a given destination directory. Export file names will be suffixed with <tenant domain>_.
Use the import feature to import a tenant:
import <tenant domain> <source directory> [<root contentstore dir>]
Ex. import testmutlit.com ExportTenant /usr/tenantstores/testmultit
This will creates a tenant by importing the tenant files from the given source directory. The import file names must be suffixed with <tenant domain>_.
Be careful if an existing tenant needs to be re-imported you need to follow certain steps
- Delete existing tenant first
- Restart server to clear the index threads
- The tenant-specific index directories and tenant-specific content directories must also be manually deleted before starting the import
This is how tenants are exported and imported in Alfresco. Feel free to comment on the post if you have any questions.