+

Search Tips   |   Advanced Search

Delete orphaned data

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

Start the wsadmin client.

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 the backup and restore the Search index operation, we 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.

To delete orphaned data from a remote application.

  1. Start wsadmin...

  2. Use the wsadmin client to access the configuration files for the remote application from which to delete the orphaned data.

    • To access the Activities configuration file:

        execfile("activitiesAdmin.py")

    • To access the Blogs or Ideation Blog configuration file:

        execfile("blogsAdmin.py")

    • To access the Files configuration file:

        execfile("filesAdmin.py")

    • To access the Forums configuration file:

        execfile("forumsAdmin.py")

    • To access the News configuration file:

        execfile("newsAdmin.py")

    • To access the Wikis configuration file:

        execfile("wikisAdmin.py")

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

    • Activities:

      ActivityService.deleteActivities(vector activities)

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

      Runs 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)

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

      Runs to generate the vector, and then delete the orphaned forums.

      commforums=ForumsService.fetchForumsByName("forumName")

      wsadmin>ForumsService.deleteForums(commforums)

    • News:

      NewsMicrobloggingService.deleteMicroblogs("communityId") This command removes all orphaned microblog and associated data for a community from the News repository.

    • Wikis:

      WikisLibraryService.delete("libraryId") Each orphaned files library has its library ID in the report labeled as an Object Identifying Id.


Parent topic:
Recover from a database failure


Related:

Delete community microblogs from the News repository