Archiving social data

Social data is stored in Mongo DB. You can archive or delete this data based on your organization's archiving policies or to manage the data size. For example, you can choose to archive all the data for closed incidents. You can perform the following tasks:

  • You can choose to store this archived data in a different location.
  • You can also choose to import the archived data whenever you need it. 
  • You can also choose to delete data.

Note

If you import the data twice you will not create duplicates.

The following topics are provided:

To archive and delete social data

  1. Update the config.js with archiving and data deletion related entries.

    By setting appropriate values of archiving and data deletion related flags, you can choose to archive and delete data, archive data without deleting, or delete data without archiving.  Following is an example snippet that shows how you can configure to data archiving without deleting it:

    archive_conf: {
            tenant_ids: [],//list of tenant ids data to archive if empty all tenant's data will be archive example: ["tentanid1", "tenantid2"]
            type:"CLOSED_ONLY",//ALL - everything or CLOSED_ONLY -> closed/resolved only tickets will be archived/deleted
            archive_flag: true,//set this to true/false if you want/don't want archive
            archive_freq : 180 ,// x days old will be archived
            delete_flag: false,//set this to true/false to delete/not to after archive
            delete_freq: 180,// y days old will be deleted
            archive_loc: "./data/archive", //all the archives will be placed here
            SECRET_KEY: "key",
            import_loc: "./data/import",
            to_db: false, //when set to true above config will be ignored and does a DB archive (delete from main Social DB and pushes to archive DB)
            db_name: "social_archive"
        },
  2. Go to <Installation directory>\SmartITMyIT\SmartITMyIT\Social

  3. Run the archive.js script. Run the following command:

    Run node scripts/archive.js

To import social data

  1. Update the config.js with archiving related entries. Following is an example snippet:

    archive_conf: {
            tenant_ids: [],//list of tenant ids data to archive if empty all tenant's data will be archive example: ["tentanid1", "tenantid2"]
            type:"CLOSED_ONLY",//ALL - everything or CLOSED_ONLY -> closed/resolved only tickets will be archived/deleted
            archive_flag: false,//set this to true/false if you want/don't want archive
            archive_freq : 180 ,// x days old will be archived
            delete_flag: false,//set this to true/false to delete/not to after archive
            delete_freq: 180,// y days old will be deleted
            archive_loc: "./data/archive", //all the archives will be placed here
            SECRET_KEY: "key",
            import_loc: "./data/import",
            to_db: false, //when set to true above config will be ignored and does a DB archive (delete from main Social DB and pushes to archive DB)
            db_name: "social_archive"
        },
  2. Go to <Installation directory>\SmartITMyIT\SmartITMyIT\Social

  3. Run the import.js script. Run the following command:

    Run node scripts/import.js
Was this page helpful? Yes No Submitting... Thank you

Comments

  1. Roshan Shinde

    Hi Team,

    This page, in the beginning, mentions about the option of choosing to delete data in the MongoDB.

    Can you please update this page with the steps to be taken/method/commands to delete the entire data that is populated in the MongoDB ?

    It would be really helpful.

    Immediate reponse would be highly appreciated.

     

    Regards,

    Roshan.

    Feb 19, 2017 11:15
    1. Bhakti Paranjpe

      Hello Roshan,

      Thank you for the query. I am investigating and will get back to you soon.

      Regards,
      Bhakti

      Feb 21, 2017 03:34
    1. Bhakti Paranjpe

      Hello Roshan,

      Along with data archiving, you can configure data deletion by setting values of data deletion related flags in the config.js file. I have specified this information in the topic.

      The following example shows how you can delete data without archiving it:

      .....

      "archive_flag": false,

      "archive_freq": 180,

      "delete_flag": true,

      "delete_freq": 180,

      .....

      Hope this helps.

      Regards,
      Bhakti

      Feb 27, 2017 11:35
      1. Roshan Shinde

        Thanks a lot for the update Bhakti.

        I will try the above option soon and update you.

         

        Regards,

        Roshan.

        Feb 28, 2017 03:19