This page describess how to migrate the modules and content from an exiting OpenCms 6 installation to a fresh installation of OpenCms 7
Installation of OpenCms 7
Make a clean default installation of OpenCms 7 by using the Setup Wizard. Before doing any module and content migration, make sure that your new OpenCms 7 installation is completed and running.
Migration of the Modules
Before migrating your ocntent, you have to migrate all of your custom build modules containgin your templates, new resourcetypes etc. If you have defined any additional resource types, you cannot migrate the content without importing the modules first.
In your OpenCms 6 installation, , switch to the root site "/" and go to the Adminstration View to select the Module management. There you can export the module by pressing the red marked export button of the module:
All modules will be saved as zip files in the folder
[tomcathome]/webapps/[webappname]/WEB-INF/packages/modules/. After you have exported all modules, copy them to the
[tomcathome]/webapps/[webappname]/WEB-INF/packages/modules/ folder of your new OpenCms 7 installation.
If your modules require additional .jar files that are not included in the modules, you must first copy them from the
[tomcathome]/webapps/[webappname]/WEB-INF/lib/ folder of your OpenCms 6 installation to the
[tomcathome]/webapps/[webappname]/WEB-INF/lib/ folder of your new installed OpenCms 7. You must restart your servlet container after that.
In your new OpenCms 7 installation, go to the Adminstration View and select Module management.
In the displayed selectbox, all modules of the folder
[tomcathome]/webapps/[webappname]/WEB-INF/packages/modules/ are listed.
Select the one you want to import and the module import will start.
If your modules contain additional resourcetypes, you must restart your servlet container after all modules are imported.
Migration of the Content
Before exporting the content, switch to the root site "/" and select the project form which you want to export your content. Normally this would be either the "Online" or "Offline" project.
Go to the Adminstration view and select "Database Management".
There, select the "Export Database" icon. In the following form, you can define which content files you want to export:
- Export file name: Enter the name of your export file here. This file will be saved in the
[tomcathome]/webapps/[webappname]/WEB-INF/packages/folder of your OpenCms 6 installation.
- Include unchanged files: Must be checked, otherweise only those files that are changed in the current project are exported.
- Include account data: Must be checked to transfer the user data from the old to the new installation.
- Include webusers data: Must only be checked if you have Webusers in your OpenCms 6 installation that should be exported.
- Include system folder: Must only be checked if you want to export files that are stored in the
- Resource changed since: Must not be added
- Recursive: Must be checked.
- Modified in project: Most not be checked.
- Resources to export: Here you can define the resources to export. In a default OpenCms installation, this would be "
/sites/default/to export the complete content of the default site. If you use other sites, you have to choose other folders here. If you have a huge OpenCms installation with several sites, it is a good idea to make an individual export of each site.
After you have exported your content, copy the export file(s) to the
[tomcathome]/webapps/[webappname]/WEB-INF/packages/ folder of your new OpenCms 7 installation.
In your new OpenCms 7 installation, the content import must be done in the root site "/" and the "Offline" project.
Switch to the Adminstration view, select "Database Management" and "Import File from Server":
In the displayed selectbox, all export files of the folder
[tomcathome]/webapps/[webappname]/WEB-INF/packages/ are listed.
Select the export file you want to import and the import will start. First, all included users and groups will be imported, followd by the files and folders. Users that already exist in the your OpenCms 7 system will not be overwritten. Files and Folder will not be publiswhed automatically after import.
Important: Make sure that you do the import in the same site you choosed for the export! Therefore it is recommended to do all exports and imports in the root site "/".