Thursday, June 20, 2013

Exporting QC Projects bigger than 4GB

Exporting projects those are bigger than 4GB from siteadmin is a known limitation of QC 11.00. Fixing this limitation is being traced under enhancement request: QCCR1J17611. Until HP publishes a fix for this limitation you can use following steps for exporting big QC projects. I've described here how to restore these backups.

  • First of all we need to reduce the project size. You can add following lines in this script just before exporting the project. Caution: Be carefull while moving the repository files the project must be deactivated. Otherwise smart repository builder job will link the rep files to invalid objects.

    ''''''''''Temporary move the repository file
    Set fso = CreateObject("Scripting.FileSystemObject")
    fso.MoveFolder v_repDirectory & "\000", v_tempPath & v_date & "_" & v_project
    sa.ExportProject v_domain, v_project, v_fileName

  • This piece of code is going to cut and paste the repository folder to temporary folder. After export process finishes put back the rep folder to it's original directory. Do not activate the project until you put back the repository folder to it's original location. Otherwise smart repositoy orginizer job will start to work and going to update the smart_repository_logical_file and smart_repository_physical_file tables. It will be safe to check the SMART_REPOSITORY_LOGICAL_FILE and SMART_REPOSITORY_PHYSICAL_FILE table data still shows the correct files.

    '''''''''Move back the repository file to its original place
    fso.MoveFolder v_tempPath & v_date & "_" & v_project, v_repDirectory & "\000"
    sa.ActivateProject v_domain, v_project

  • Of course you've to define v_tempPath (whereever you have available on network or on disk) and v_repDirectory (the repository path of the project) in the beginning of the script.
  • You can get the repository folder backup with the following batch commands. I am assuming you are using 7-zip command line version.

    set hr=%time:~0,2%
    if "%hr:~0,1%" equ " " set hr=0%hr:~1,1%
    7za.exe a -t7z YourProjectName_%date:~-4,4%%date:~-10,2%%date:~-7,2%_%hr%%time:~3,2%%time:~6,2%.7z YourRepositoryDirectory\YourProjectName\ProjRep


Abi said...

So, does this mean that if we move the Repository folder to another path and then do the 'Export Project' from the Site admin, it will work ?

The repository is more than 10 GB in my project.

Mehmet Kahraman said...

Yes it should...
But be careful, after you've done DO NOT ACTIVATE THE PROJECT! Before activating the project you have to move the repository folder to its original directory.

Mehmet Kahraman said...

And do not forget to deactivate the project before moving the repository folder.