Use administrative commands to export activities.
Before you begin
If you want to transfer standard activity content from one system to another, you can export the activities to an external directory and then import them to the new system. This does not apply to community activities. You can only import community activities to the same deployment from which they were exported. See Importing activities
for information on importing.
To run administrative commands, you must use the wsadmin client. See Starting the wsadmin client
About this task
The data associated with the Activities application is stored in more than one place. For standard activities the activities and the member information associated with them are stored in the Activities database tables. For community activities, the activities themselves are stored in the Activities database tables and the member information is stored in the Communities database tables. For both activity types, any file attachments that are added to activities are stored in the content store on the file system. When you run the export process to export activities, it collects the data from all of these locations and stores it in one ZIP file per activity.
To export activities, complete the following steps:
- Start the Activities Jython script interpreter.
- Use the following command to access the Activities configuration file:
The command in this procedure writes information to a file. If prompted to specify a service to connect to, specify the node where the file that you want to write to is stored.
- Use one of the following commands to get a list of activities that you want to export:
To get a list of community activities to export, complete the following steps:
- Identify the member of interest and save the member information to a variable using the following command:
- To retrieve a subset of activities that were created by the member and save it to variable, use the following command:
Alternatively, you can create the following subsets of activities. Note that these commands only return standard activities; they do not return community activities:
- To get a list of all the standard activities to which the member has access:
- To get a list of all the standard activities that the member owns:
Use the following command to export the activities:
- Search by name for the community that owns the activities that you want to export using the following command:
- From the list of communities returned, find the community of interest and make a note of its unique ID.
- Pass that unique ID into the following command to write the activities associated with the community to a java.util.Vector variable that you can later pass to the export command:
ArchiveService.exportActivities(java.lang.String export_directory, java.util.Vector activities)
- export_directory is the directory path in which you want the activities which are exported as ZIP files to be stored. This directory must exist on the server that you were prompted to provide after running the execfile command to access the activitiesAdmin.py file.
- activities is the java.util.Vector variable you created to define the activities that you want to export.
or to export only John's activities:
or to export only the activities created in September:
or to export the community activities:
If the export is successful, one ZIP file is created in the export repository for each activity being exported, and the wsadmin client returns an empty set of square brackets. If one of the activities cannot be exported, information about it is returned to the wsadmin client's command line. Refer to the SystemOut.log file to find log messages that are written to it from the export process.
Parent topic: Administering Activities
Starting the wsadmin client
Getting a list of activities
Activities administrative commands