Skip to main content
Druva Documentation

How to download only PST files of users on legal hold using direct download utility

This article applies to:

  • Product edition: inSync Cloud

Overview

This article describes the procedure to download PST files backed up from users that are placed on legal hold. Although this procedure is recommended only to download PST files, it can also be used to download other file types.

Download PST files of legal hold users

  1. Download the .csv file of the users on legal hold for whom the PST files need to be downloaded.
  2. Download only metadata of the legal hold users by using -o in the direct download utility command as follows:

    inSyncDirectDownload.exe -u legalhold_admin@domain.com -p <inSync Password or inSync API Token> -l C:\legalhold_test -c C:\legalhold_test\WebdavDirectDownload.csv -o 

    The above command downloads the following files:
  3. Open the user db file and modify the same using SQLite Manager.
  4. Run the query:

    delete from metadata_state where relative_webdav_url not like '%pst'  
    This query keeps the references for PST files and deletes the rest.
  5. Download the data with the command:

    inSyncDirectDownload.exe -u legalhold_admin@domain.com -p <inSync API Token> -l C:\legalhold_test -c C:\legalhold_test\WebdavDirectDownload.csv

If there are errors while downloading the metadata file or if the metadata file gets corrupt, the direct download utility downloads the metadata file again at the time of data download. In this scenario, all the data gets downloaded as the modified user DB file does not get honored. To force a direct download utility to honor a modified user database file (in step 4 of the above procedure) in such a scenario and download only PST files, modify the legal hold policy name db file (Legalhold_policy.db). Hence, the status of the metadata download gets forcefully marked as complete and the direct download utility does not download the metadata file again. 

The logic that reports the status of the metadata download is located inside the "is_metadata_downloaded" parameter of the "device_state" table. The "device_state" table resides inside the legal hold policy db file. Hence the "is_metadata_downloaded" parameter must be modified as specified below:

  • Metadata is downloaded again if the value of "is_metadata_downloaded" = 0
  • Metadata is not downloaded again if the value of "is_metadata_downloaded" = 1

Modify the legal hold db file

This procedure is a workaround and not for general use. Inform the inSync Administrator about bypassing the checks performed by the direct download utility and using it to download the data of users on legal hold. Any damage to the DB must at the customers' risk.

To modify the legal hold db file:

  1. Download and install the DB browser for SQLite tool from: https://github.com/sqlitebrowser/sqlitebrowser/releases.
  2. Launch the DB browser for SQLite tool.
  3. Open the legal hold DB file downloaded and located under the DB folder.
  4. Run the following SQL query to set the value of "is_metadata_downloaded" to 1. 

    update device_state 
    set is_metadata_downloaded = 1 
    where rowid =<rowid of the affected user in table>