none
TFS Backup (2013) fine; TFS Restore (2017) gave “Success with Issues”

    Question

  • The error on the TFS 2017 box was “TF400980: Failed to restore the Reporting Service encryption key. You can try using RSKEYMGMT command to restore the encryption key”. Why is this happening? 

    Background: I ran TFS 2013 backup, creating all backups (including Report Server databases and encryption key). On the TFS 2017 box is installed sql 2016 wSP1 as well as the default Reporting service (Native).  The first time I ran TFS Restore on the 2017 box it indicated I needed to delete or rename the Reporting Server databases (?)  I stopped the 2017 reporting services, deleted the reporting DBs, re-ran the TFS Restore and got the above error. Now I’m just confused.  When I’m trying to restore the 2013 DBs to a 2017 box what is the underlying assumption as to what databases are present, or not present, on the 2017 box?

    TIA.

    Edm2


    • Edited by edm2 Tuesday, March 21, 2017 1:21 PM
    Sunday, March 19, 2017 10:43 PM

Answers

  • Limitxiao,

    I backed-up and restored the DBs manually and that worked. Go figure! (BTW: when I tried using RSKEYMGMT it said I didn't have NET 3.5 installed, which I don't on the TFS 2017 box. Glad the manual backup\restore did the trick.)

    edm2


    P.S. Great URL!
    Wednesday, March 22, 2017 1:29 PM

All replies

  • Hi edm2,

    Thank you for posting here.

    How did you backup the enctyption key(Use the Reporting Services, command line or the built-in backup feature)? According to the error message, I suggest that you could try to use the RSKEYMGMT command to restore the enctyption key like the following link:

    https://msdn.microsoft.com/en-us/library/ms157275.aspx

    Or you could use the built-in backup feature to backup, it will backup all the databases and enctyption key automatically. Then also use the restore the feature to restore all the databases and the key directly:

    https://www.visualstudio.com/en-us/docs/setup-admin/tfs/admin/move-clone-hardware#restore-the-tfs-databases

    And what did you mean about "When I’m trying to restore the 2013 DBs to a 2017 box what is the underlying assumption as to what databases are present, or not present, on the 2017 box?"

    You need to restore all the databases include the report database and enctyption key on the 2017 box.

    Best Regards

    Limitxiao Gao


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, March 21, 2017 2:51 AM
    Moderator
  • Limitxiao,

    1. I backed up the TFS 2013 databases, including the encryption key from inside the Team Foundation Server Admin Console  (Created a "Schedule backup" job in the console, including Reporting Service databases and key, and ran the job manually).

    2. Regarding the use of "RSKEYMGMT ". That will be my next stop but I'm trying to understand what I'm doing wrong. The TFS Backup\restore facility does not work as expected for me.

    3. When I restore the TFS 2013 databases to the TFS 2017 box (using the TFS Admin console) it does a database conflict check -- I was told that it couldn't restore the Reporting databases as they already exist on the 2017 box and I either needed to delete them or rename them. (The Reporting Service databases were already in place from the original sql server install I did.) That's what I meant by what is expected to be in place on the 2017 box. Apparently, no TFS-related databases are allowed!

    edm2


    • Edited by edm2 Tuesday, March 21, 2017 3:24 AM
    Tuesday, March 21, 2017 3:21 AM
  • Hi edm2,

    After installing SQL Server, if your deployment includes reporting, open SQL Server Management Studio and detach the ReportServer and ReportServerTempDB databases. Otherwise you might not be able to restore these databases with the backup you created for the TFS databases. Please check this link:

    https://www.visualstudio.com/en-us/docs/setup-admin/tfs/admin/move-clone-hardware#back-up-the-databases-and-the-sql-server-reporting-services-encryption-key

    Best Regards

    Limitxiao Gao


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, March 21, 2017 6:38 AM
    Moderator
  • Limitxiao,

    I may be forced to do that but that is a weird solution. After all, the Reporting Server DBs were installed by the original sql install. They were made to work with it. Detaching them, and then replacing them with the TFS 2013 ones, makes me wonder if I should even install Reporting Services at all  on the  2017 box. Something here is "fishy".

    I reviewed the URL and it's basically the approach I took. BUT here's an interesting extract:

    "Install SQL Server on the new server and make sure that it is operational. If your previous deployment used reporting, make sure that you include the reporting and analysis services components. You must install the same version and edition that you used previously, including service pack and cumulative update levels."

    Install the same version??? Not possible!  My TFS 2017.1 box uses Sql 2016 while the TFS2013 uses Sql 2012. The article implies the Reporting Server upgrade is not possible!

    edm2



    • Edited by edm2 Tuesday, March 21, 2017 6:49 AM
    Tuesday, March 21, 2017 6:44 AM
  • Hi edm2,

    This article is applied to move TFS not move&upgrade, so it ask you to use the same version of SQL Server:), you do not need to use the same version. When you create the SQL Server Instance, it will create a ReportServerTempDB database automatically. But TFS also have the ReportServerTempDB database, so when TFS need to restore the database to the new instance, it will find there is already a ReportServerTempDB database. Then it will ask you to rename the database or remove the original database to avoid the conflict.

    You still need to install the SQL Server Reporting Services, but also need to delete the original database created by SQL Server. So that TFS could restore the report database.

    Note: The restore process not restore the content of the database to another database, it just restore the whole database directly. So you will get the conflict.

    Best Regards

    Limitxiao Gao


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.



    Tuesday, March 21, 2017 7:13 AM
    Moderator
  • Limitxiao,

    Given the different Sql versions on the TFS 2013 and 2017 boxes I am indeed doing a move and an upgrade (sql version wise), not simply a move.  I have had nothing but bad luck, hidden assumptions, etc with the Backup\Restore options in TFS Admin console and have no confidence in it any longer. I'm going to try quiescing the TFS server, take the normal sql backup of all TFS databases with COPY_ONLY (including Reporting key), restore them to a new sql server (later version) manually, and then run the TFS configuration wizard. (Hopefully this will upgrade the Reporting databases)

    edm2

    Tuesday, March 21, 2017 1:33 PM
  • Hi edm2,

    You could also backup and restore the databases manually. Please feel free to come back to let us know the result. You could refer to the following link about migrate from TFS2013 to TFS2015. It can also be applied to your issue:

    https://blogs.msdn.microsoft.com/tfssetup/2015/09/30/migration-update-from-team-foundation-server-tfs-2013-to-tfs-2015-with-reporting-and-sharepoint/

    Best Regards

    Limitxiao Gao


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, March 22, 2017 8:22 AM
    Moderator
  • Limitxiao,

    I backed-up and restored the DBs manually and that worked. Go figure! (BTW: when I tried using RSKEYMGMT it said I didn't have NET 3.5 installed, which I don't on the TFS 2017 box. Glad the manual backup\restore did the trick.)

    edm2


    P.S. Great URL!
    Wednesday, March 22, 2017 1:29 PM
  • Hi edm2,

    Glad to know that you haves solved your issue. Could you please mark your reply as answer? so it would be benefit for other users who get the same issue with you. Thank you for your understanding.

    Best Regards

    Limitxiao Gao


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, March 23, 2017 7:28 AM
    Moderator