This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Restoring Sophos45 on Sophos50 database

hi, 

i recently  installing a fresh SEC 5.0 on my new server. 

the installation in success, with a new SOHPOS50 database of course (download also completed via the internet).

next phase:

import database from my pld server SOPHOS45.

i run restoredb.exe d:\sophos45.bak .\sophos sophos50 -->resulting the SEC now cannot start.

i've been walking around to find how to manage upgrading the database SOPHOS45 directly to 5.0 without affecting my old server.  so i tried to firstly :

- restore SOPHOS45.bak to mssqlserver,

-run upgradeDB.exe -debug -sourceVersion=45 , from ny new server, it said complete. but the database still empty.

i have also found an article said that the UpgradeDB.exe looked up to registry HKLM\software\sophos\ee\management tools\databaseconnectionMS

so i edited the key from SOPHOS50 to SOPHOS45, and SOPHOS47

niether works.

i need help.

thanks for any help.

:27071


This thread was automatically locked due to age.
Parents
  • HI,

    What you're doing is not really supported.  The upgrade should work as follows:

    Scenario: SEC 4.5 with its SOPHOS45 database, all working, then upgrading to SEC 5.0.

    Run the installer of SEC 5.0.  The database component of the install, will create you a SOPHOS50, SOPHOSPATCH database.   Note: A list of databases to versions is here: http://www.sophos.com/en-us/support/knowledgebase/17323.aspx.

    So no data at this point has been moved from the SOPHOS45 to SOPHOS50.  SOPHOS50 and SOPHOSPATCH just have all the tables, stored procedures, functions etc.

    The next component to be installed is the server part, this is the component that under the covers runs UpgradeDB.exe.  This exe connects to the new database (in this case SOPHOS50) by reading the connection string and runs a stored procedure to move the data from SOPHOS45 to SOPHOS50.  This is when the data is actually migrated.  The last component to go on is the console, and you're done.  At this point if all has gone well you can drop SOPHOS45 as it is no longer referenced or used.

    You can't really, install SEC 5.0, then attach a previous SOPHOS45 to the instance, and run:

    upgradeDB.exe -debug -sourceVersion=45

    to move the data over.  The old database will have entries in it that refer to the tickets in the secret store that wasn't moved over.  http://www.sophos.com/en-us/support/knowledgebase/27265.aspx describes how to do disaster recovery and touches on this sort of thing.

    So, the command you ran:

    restoredb.exe d:\sophos45.bak .\sophos sophos50

    Is wrong as you can't restore the SOPHOS45 database over the SOPHOS50.  The Sophos management service will not connect to it as it's the wrong version.

    If you want to try doing it this way, you will now need to:

    Re-create the SOPHOS50 database and SOPHOSPATCH databases by running the commands as mentioned here:

    http://www.sophos.com/en-us/support/knowledgebase/116768.aspx

    C:\Sec_50\ServerInstaller\DB\Core\InstallDB.bat .\SOPHOS [DomainName] SOPHOS50

    C:\Sec_50\ServerInstaller\DB\Patch\CreatePatchDB.bat .\SOPHOS [DomainName] SOPHOSPATCH

    Where:
    [DomainName] should be in the domain NetBIOS name form. E.g. DOMAIN, not the full DNS name for the domain. This should be the 'context' of the 'Sophos DB Admins' group.  So on a member server or workgroup it's typically the computer name, if it's a DC it will be the domain name.

    Then create a SOPHOS45 database using the command:

    sqlcmd -E -S .\sophos -Q "create database SOPHOS45"

    drop the existing one first if needed:
    sqlcmd -E -S .\sophos -Q "drop database SOPHOS45" 

    Restore your old SOPHOS45 to the new database by running:
    restoredb.bat d:\sophos45.bak .\sophos sophos45

    Then you can try running:
    upgradeDB.exe -debug -sourceVersion=45

    to move the data from SOPHOS45 to SOPHOS50.

    The management service will then start (if not check the application event log for the latest error from the management service), but you will probably need to re-enter the passwords for the updating accounts and the SUM accounts in the policies and SUM config as the migrated data will reference private store entries that don't exist.

    Hope it helps get you going.

    Regards,

    Jak

    :27073
Reply
  • HI,

    What you're doing is not really supported.  The upgrade should work as follows:

    Scenario: SEC 4.5 with its SOPHOS45 database, all working, then upgrading to SEC 5.0.

    Run the installer of SEC 5.0.  The database component of the install, will create you a SOPHOS50, SOPHOSPATCH database.   Note: A list of databases to versions is here: http://www.sophos.com/en-us/support/knowledgebase/17323.aspx.

    So no data at this point has been moved from the SOPHOS45 to SOPHOS50.  SOPHOS50 and SOPHOSPATCH just have all the tables, stored procedures, functions etc.

    The next component to be installed is the server part, this is the component that under the covers runs UpgradeDB.exe.  This exe connects to the new database (in this case SOPHOS50) by reading the connection string and runs a stored procedure to move the data from SOPHOS45 to SOPHOS50.  This is when the data is actually migrated.  The last component to go on is the console, and you're done.  At this point if all has gone well you can drop SOPHOS45 as it is no longer referenced or used.

    You can't really, install SEC 5.0, then attach a previous SOPHOS45 to the instance, and run:

    upgradeDB.exe -debug -sourceVersion=45

    to move the data over.  The old database will have entries in it that refer to the tickets in the secret store that wasn't moved over.  http://www.sophos.com/en-us/support/knowledgebase/27265.aspx describes how to do disaster recovery and touches on this sort of thing.

    So, the command you ran:

    restoredb.exe d:\sophos45.bak .\sophos sophos50

    Is wrong as you can't restore the SOPHOS45 database over the SOPHOS50.  The Sophos management service will not connect to it as it's the wrong version.

    If you want to try doing it this way, you will now need to:

    Re-create the SOPHOS50 database and SOPHOSPATCH databases by running the commands as mentioned here:

    http://www.sophos.com/en-us/support/knowledgebase/116768.aspx

    C:\Sec_50\ServerInstaller\DB\Core\InstallDB.bat .\SOPHOS [DomainName] SOPHOS50

    C:\Sec_50\ServerInstaller\DB\Patch\CreatePatchDB.bat .\SOPHOS [DomainName] SOPHOSPATCH

    Where:
    [DomainName] should be in the domain NetBIOS name form. E.g. DOMAIN, not the full DNS name for the domain. This should be the 'context' of the 'Sophos DB Admins' group.  So on a member server or workgroup it's typically the computer name, if it's a DC it will be the domain name.

    Then create a SOPHOS45 database using the command:

    sqlcmd -E -S .\sophos -Q "create database SOPHOS45"

    drop the existing one first if needed:
    sqlcmd -E -S .\sophos -Q "drop database SOPHOS45" 

    Restore your old SOPHOS45 to the new database by running:
    restoredb.bat d:\sophos45.bak .\sophos sophos45

    Then you can try running:
    upgradeDB.exe -debug -sourceVersion=45

    to move the data from SOPHOS45 to SOPHOS50.

    The management service will then start (if not check the application event log for the latest error from the management service), but you will probably need to re-enter the passwords for the updating accounts and the SUM accounts in the policies and SUM config as the migrated data will reference private store entries that don't exist.

    Hope it helps get you going.

    Regards,

    Jak

    :27073
Children
No Data