Delete orphaned data 

Delete orphaned data from remote applications following a system crash or database failure.


Before starting

To use wsadmin commands, use the IBM WAS wsadmin client. See Starting the wsadmin client for details.


About this task

When you run the CommunitiesRemoteAppService.generateSyncReports command following a system crash or database failure, the command generates two reports, one of which is the orphanedRemoteApplications report. This report lists all the remote applications that have been orphaned as a result of the failure.

As part of your backup and restore operation, you can run the CommunitiesRemoteAppService.assignRemoteApp command for each remote application listed in the orphanedRemoteApplications report to reassociate each instance with a community. For some of the orphaned resources, you might choose to delete the data from the remote applications. The following instructions explain how to delete any orphaned resources that you don't want associated with a community.


Procedure

To delete orphaned data from a remote application...

  1. From the dmgr host:

  2. To access the Blogs or Ideation Blog configuration file, use the following command:

      execfile("blogsAdmin.py")

  3. To access the Files configuration file, use the following command:

      execfile("filesAdmin.py")

  4. To access the Forums configuration file, use the following command:

      execfile("forumsAdmin.py")

  5. To access the Wikis configuration file, use the following command:

      execfile("wikisAdmin.py")

  6. To delete the orphaned data, use one of the following commands:

    • Activities:

        ActivityService.deleteActivities(vector activities)

        Note: The Activities widget can contain multiple activities associated with a single community. You can use the oldCommunityId as an identifier to query for a vector of all orphaned activities and delete them.

        Use the following commands to generate the vector, and then delete the orphaned activities.

        commact=ActivityService.fetchActivitiesByCommunityExId("oldCommunityUuid")

        wsadmin>ActivityService.deleteActivities(commact)

        where <oldCommunityUuid> comes from the orphanReport.

    • Blogs and Ideation Blogs:

        BlogsAdminService.deleteWeblog("weblogId")

    • Each orphaned blog and Ideation Blog has its blog ID in the report labeled as an Object Identifying Id.

    • Files:

        FilesLibraryService.delete("libraryId")

    • Each orphaned files library has its library ID in the report labeled as an Object Identifying Id.

    • Forums:

        ForumsService.deleteForums(Vector <Hashtable>)

        Note: The Forums widget can contain multiple forums associated with a single community. You can use the forum name to query for a vector of forums and delete them.

        Use the following commands to generate the vector, and then delete the orphaned forums.

        commforums=ForumsService.fetchForumsByName("forumName")

        wsadmin>ForumsService.deleteForums(commforums)

    • Wikis:

        WikisLibraryService.delete("libraryId")

    • Each orphaned files library has its library ID in the report labeled as an Object Identifying Id.


Parent topic

Recovering from a database failure
Previous topic: Assigning orphaned remote applications to a community


Related tasks


Restore a Community Blogs widget


   

 

});

+

Search Tips   |   Advanced Search