<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>article Restore Apps after Deletion from QMC in Official Support Articles</title>
    <link>https://community.qlik.com/t5/Official-Support-Articles/Restore-Apps-after-Deletion-from-QMC/ta-p/1711518</link>
    <description>&lt;P&gt;When apps are deleted from the QMC, the app and associated Static Content (like images) are both deleted from disk.&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Delete Apps.png" style="width: 345px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/54609i47EC82F08E268E4D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Delete Apps.png" alt="Delete Apps.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H4&gt;Environment:&lt;/H4&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;LI-PRODUCT title="Qlik Sense Enterprise on Windows" id="qlikSenseEnterpriseWindows"&gt;&lt;/LI-PRODUCT&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;This means that simply restoring the app from a backup system will not restore all app properties, like images or user sheets. General directions for restoring an app from backup without images or user sheets can be found here:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/t5/Knowledge-Base/Restore-deleted-app-in-Qlik-Sense-Import-app-in-Qlik-Sense/ta-p/1712685" target="_blank" rel="noopener"&gt;Restore deleted app in Qlik Sense, Import app in Qlik Sense &lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Restoring an app with user sheets can only be done if a version of the original app remains on the host QMC, or a Repository Backup has been taken. That can be a duplicate of the app or the original app with missing QVF. This is because user sheets are stored in the Repository and associated with the app. There is currently no way to re-associate Repository sheets with different apps.&lt;/P&gt;
&lt;P class="qlik-migrated-tkb-headings"&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3 class="qlik-migrated-tkb-headings"&gt;Resolution:&lt;/H3&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are a few different ways to remedy this, assuming a backup of some type has been taken.&lt;BR /&gt;&lt;BR /&gt;If there is a proper Repository Backup, &lt;STRONG&gt;reverting to the backup&lt;/STRONG&gt; is the easiest way to fix this. Repository Backup/Restore procedures can be found here:&amp;nbsp;&lt;A href="https://help.qlik.com/en-US/sense/June2019/Subsystems/PlanningQlikSenseDeployments/Content/Sense_Deployment/Backup-and-restore.htm" target="_blank" rel="noopener"&gt;Backup and restore Qlik Sense Enterprise on Windows&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;If a backup of the app binary has been made, then the &lt;STRONG&gt;binary can be re-imported&lt;/STRONG&gt;. Any images associated with that app will need to be re-applied manually as binaries do not include these images.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Import Button.png" style="width: 153px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/54610iD932FF3B6D0403DE/image-size/large?v=v2&amp;amp;px=999" role="button" title="Import Button.png" alt="Import Button.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;If an export of the app has been saved, the &lt;STRONG&gt;app export can be re-imported&lt;/STRONG&gt;. This will have the images in-tact as exports are saved with images.&lt;BR /&gt;&lt;BR /&gt;If a &lt;STRONG&gt;full disk backup&lt;/STRONG&gt; has been made, this can be restored on the current system with no loss.&lt;BR /&gt;&lt;BR /&gt;If the full disk backup is old, and you do no wish to miss the data changed since the backup, you can restore the disk on a different system. Then, &lt;STRONG&gt;export the apps from the restored system and import them in the active system&lt;/STRONG&gt;.&lt;BR /&gt;&lt;BR /&gt;If there are many apps, this can also be done via API commands in Powershell.&lt;BR /&gt;Export all apps:&lt;/P&gt;
&lt;PRE&gt;$hdrs = @{}
$hdrs.Add("X-Qlik-Xrfkey","examplexrfkey123")
$hdrs.Add("X-Qlik-User", "UserDirectory=INTERNAL; UserId=sa_repository")
$cert = Get-ChildItem -Path "Cert:\CurrentUser\My" | Where {$_.Subject -like '*QlikClient*'}
$apps = Invoke-RestMethod -Uri "https://qlikserver1.domain.local:4242/qrs/app/full?Xrfkey=examplexrfkey123" -Method Get -Headers $hdrs -ContentType 'application/json' -Certificate $cert
$appIDs = $apps.id
echo $appIDs

foreach ($id in $appIDs) {
    $body = '{}'
    $Data = Get-Content C:\ProgramData\Qlik\Sense\Host.cfg
    $FQDN = [System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($($Data)))
    [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]'Ssl3,Tls,Tls11,Tls12'
    $download = Invoke-RestMethod -Uri "https://$($FQDN):4242/qrs/App/$id/export/$($id)?xrfkey=examplexrfkey123" -Method Post -Body $body -Headers $hdrs -ContentType 'application/json' -Certificate $cert
    Invoke-RestMethod -Uri "https://$($FQDN):4242$($download.downloadPath)" -Method Get -Headers $hdrs -ContentType 'application/json' -Certificate $cert |  Set-Content $id.qvf -Encoding Ascii
}
&lt;/PRE&gt;
&lt;P&gt;Note: This will result in several errors like the following: "Set-Content : Cannot bind argument to parameter 'Path' because it is null." These can be ignored.&lt;BR /&gt;&lt;BR /&gt;Import all apps on new system:&lt;BR /&gt;**In Progress**&lt;/P&gt;</description>
    <pubDate>Mon, 10 May 2021 10:40:34 GMT</pubDate>
    <dc:creator>Chris_Rice</dc:creator>
    <dc:date>2021-05-10T10:40:34Z</dc:date>
    <item>
      <title>Restore Apps after Deletion from QMC</title>
      <link>https://community.qlik.com/t5/Official-Support-Articles/Restore-Apps-after-Deletion-from-QMC/ta-p/1711518</link>
      <description>&lt;P&gt;When apps are deleted from the QMC, the app and associated Static Content (like images) are both deleted from disk.&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Delete Apps.png" style="width: 345px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/54609i47EC82F08E268E4D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Delete Apps.png" alt="Delete Apps.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H4&gt;Environment:&lt;/H4&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;LI-PRODUCT title="Qlik Sense Enterprise on Windows" id="qlikSenseEnterpriseWindows"&gt;&lt;/LI-PRODUCT&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;This means that simply restoring the app from a backup system will not restore all app properties, like images or user sheets. General directions for restoring an app from backup without images or user sheets can be found here:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/t5/Knowledge-Base/Restore-deleted-app-in-Qlik-Sense-Import-app-in-Qlik-Sense/ta-p/1712685" target="_blank" rel="noopener"&gt;Restore deleted app in Qlik Sense, Import app in Qlik Sense &lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Restoring an app with user sheets can only be done if a version of the original app remains on the host QMC, or a Repository Backup has been taken. That can be a duplicate of the app or the original app with missing QVF. This is because user sheets are stored in the Repository and associated with the app. There is currently no way to re-associate Repository sheets with different apps.&lt;/P&gt;
&lt;P class="qlik-migrated-tkb-headings"&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3 class="qlik-migrated-tkb-headings"&gt;Resolution:&lt;/H3&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are a few different ways to remedy this, assuming a backup of some type has been taken.&lt;BR /&gt;&lt;BR /&gt;If there is a proper Repository Backup, &lt;STRONG&gt;reverting to the backup&lt;/STRONG&gt; is the easiest way to fix this. Repository Backup/Restore procedures can be found here:&amp;nbsp;&lt;A href="https://help.qlik.com/en-US/sense/June2019/Subsystems/PlanningQlikSenseDeployments/Content/Sense_Deployment/Backup-and-restore.htm" target="_blank" rel="noopener"&gt;Backup and restore Qlik Sense Enterprise on Windows&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;If a backup of the app binary has been made, then the &lt;STRONG&gt;binary can be re-imported&lt;/STRONG&gt;. Any images associated with that app will need to be re-applied manually as binaries do not include these images.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Import Button.png" style="width: 153px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/54610iD932FF3B6D0403DE/image-size/large?v=v2&amp;amp;px=999" role="button" title="Import Button.png" alt="Import Button.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;If an export of the app has been saved, the &lt;STRONG&gt;app export can be re-imported&lt;/STRONG&gt;. This will have the images in-tact as exports are saved with images.&lt;BR /&gt;&lt;BR /&gt;If a &lt;STRONG&gt;full disk backup&lt;/STRONG&gt; has been made, this can be restored on the current system with no loss.&lt;BR /&gt;&lt;BR /&gt;If the full disk backup is old, and you do no wish to miss the data changed since the backup, you can restore the disk on a different system. Then, &lt;STRONG&gt;export the apps from the restored system and import them in the active system&lt;/STRONG&gt;.&lt;BR /&gt;&lt;BR /&gt;If there are many apps, this can also be done via API commands in Powershell.&lt;BR /&gt;Export all apps:&lt;/P&gt;
&lt;PRE&gt;$hdrs = @{}
$hdrs.Add("X-Qlik-Xrfkey","examplexrfkey123")
$hdrs.Add("X-Qlik-User", "UserDirectory=INTERNAL; UserId=sa_repository")
$cert = Get-ChildItem -Path "Cert:\CurrentUser\My" | Where {$_.Subject -like '*QlikClient*'}
$apps = Invoke-RestMethod -Uri "https://qlikserver1.domain.local:4242/qrs/app/full?Xrfkey=examplexrfkey123" -Method Get -Headers $hdrs -ContentType 'application/json' -Certificate $cert
$appIDs = $apps.id
echo $appIDs

foreach ($id in $appIDs) {
    $body = '{}'
    $Data = Get-Content C:\ProgramData\Qlik\Sense\Host.cfg
    $FQDN = [System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($($Data)))
    [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]'Ssl3,Tls,Tls11,Tls12'
    $download = Invoke-RestMethod -Uri "https://$($FQDN):4242/qrs/App/$id/export/$($id)?xrfkey=examplexrfkey123" -Method Post -Body $body -Headers $hdrs -ContentType 'application/json' -Certificate $cert
    Invoke-RestMethod -Uri "https://$($FQDN):4242$($download.downloadPath)" -Method Get -Headers $hdrs -ContentType 'application/json' -Certificate $cert |  Set-Content $id.qvf -Encoding Ascii
}
&lt;/PRE&gt;
&lt;P&gt;Note: This will result in several errors like the following: "Set-Content : Cannot bind argument to parameter 'Path' because it is null." These can be ignored.&lt;BR /&gt;&lt;BR /&gt;Import all apps on new system:&lt;BR /&gt;**In Progress**&lt;/P&gt;</description>
      <pubDate>Mon, 10 May 2021 10:40:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Official-Support-Articles/Restore-Apps-after-Deletion-from-QMC/ta-p/1711518</guid>
      <dc:creator>Chris_Rice</dc:creator>
      <dc:date>2021-05-10T10:40:34Z</dc:date>
    </item>
  </channel>
</rss>

