« Previous Next »

Thread: How to copy the actual files & database for a server to another.

Last post 06-22-2009 5:17 PM by spyinsky. 11 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (12 items)

Sort Posts:

  • 06-17-2009, 11:44 AM

    • spyinsky
    • Not Ranked
    • Joined on 06-17-2009, 10:56 AM
    • Posts 13

    How to copy the actual files & database for a server to another.

    I have used the following command to copy a site on remote server to one more site on the same remote server.

    C:\Program Files (x86)\IIS\Microsoft Web Deploy>msdeploy -verb:sync -source:meta
    key=lm/w3svc/1378685816,computername=\\server-002 -dest:metakey=lm/w3svc/2397814
    18,computername=\\server-002 -whatif > msdeploysync.log

     But it did not copy any files OR copy any database of it.

     How to copy the files & the sql database?

  • 06-17-2009, 12:06 PM In reply to

    • kateroh
    • Top 50 Contributor
    • Joined on 10-27-2008, 11:19 PM
    • Posts 137

    Re: How to copy the actual files & database for a server to another.

    You need to sync your database separately as it is not automatically pulled into sync by MSDeploy. Better yet, you can create a manifest file that will tell MSDeploy what resources to pull from the source and what resources to create on the destination. You will need to write something like:

    Source manifest:

    <MSDeploy.metakey>
       <
    metakey path="lm/w3svc/1378685816" />
       <
    dbFullSql path="<connection string or physical path to the source database>" />
    </MSDeploy.metakey>

    Destination manifest:

    <MSDeploy.metakey>
       <
    metakey path="lm/w3svc/239781418" />
       <
    dbFullSql path="<connection string or physical path to the destination database>" />
    </MSDeploy.metakey>

    And do the sync using the manifest provider:

    msdeploy -verb:sync -source:manifest=<path to source manifest>,computername=\\server-002 -dest:manifest=<path to destination manifest>,computername=\\server-002 -whatif –enableLink:ContentExtension > msdeploysync.log

    Where -enableLink:ContentExtension will also solve your problem with pulling in the content.

    Hope this helps!

    Thanks,
    Katerina Rohonyan, SDET, Microsoft IIS Team
  • 06-17-2009, 12:35 PM In reply to

    • spyinsky
    • Not Ranked
    • Joined on 06-17-2009, 10:56 AM
    • Posts 13

    Re: How to copy the actual files & database for a server to another.

    Thanks Katerina on ur suggestion to create the manifest file.

     

    I am now running the command, let me update this after everthing goes smoothly.

     

    thanks again for your help.

  • 06-17-2009, 12:51 PM In reply to

    • spyinsky
    • Not Ranked
    • Joined on 06-17-2009, 10:56 AM
    • Posts 13

    Re: How to copy the actual files & database for a server to another.

     Bad luck to me. I get the following error

    --------------------------
    Error:  The AppPoolNotFound dependency check found the AppPool '7-8' to be in us
    e by the source data but not defined in source data or on the destination machin
    e.  Applications referencing this app pool will have configuration issues.
    Error:  [Error]The AppPoolNotFound dependency check found the AppPool '7-8' to b
    e in use by the source data but not defined in source data or on the destination
     machine.  Applications referencing this app pool will have configuration issues
    .
    Error count: 2

    --------------------------

    when i run: 

    C:\Program Files (x86)\IIS\Microsoft Web Deploy>msdeploy -verb:sync -source:mani
    fest=7-8.xml,computername=\\server-002 -dest:manifest=7-10.xml,computername=\\server-002 -whatif -enableLink:ContentExtension > msdeploysync.log

    & both the manifest files are in the same folder of Microsoft web deploy.

     

  • 06-17-2009, 12:55 PM In reply to

    • spyinsky
    • Not Ranked
    • Joined on 06-17-2009, 10:56 AM
    • Posts 13

    Re: How to copy the actual files & database for a server to another.

    What I am trying to achive is:

    Create a new website from an original website. The new website is an empty folder right now, with an appPool & website created in the IIS. 

    The old site has all the files & appPool & website created on the same Server

    -----------------------

    The app pool dependencies are below.

    C:\Program Files (x86)\IIS\Microsoft Web Deploy>msdeploy -verb:getDependencies -
    source:metakey=lm/w3svc/1378685816,computername=\\server-002
    <dependencyInfo>
      <dependencies>
        <dependency name="AnonymousAuthentication" />
        <dependency name="WindowsAuthentication" />
      </dependencies>
      <apppoolsInUse>
        <apppoolInUse name="7-8" definitionIncluded="False" />
      </apppoolsInUse>
      <isapis>
        <isapi dll="C:\WINDOWS\system32\inetsrv\httpodbc.dll" enabled="False" />
      </isapis>
    </dependencyInfo>

     

  • 06-17-2009, 3:29 PM In reply to

    • spyinsky
    • Not Ranked
    • Joined on 06-17-2009, 10:56 AM
    • Posts 13

    Re: How to copy the actual files & database for a server to another.

     do we have to install MSDEPLOY on the remote server to use it as a Source/Destination.

     

    Following is the detailed error I receive :


    Error:  The AppPoolNotFound dependency check found the AppPool '7-8' to be in us
    e by the source data but not defined in source data or on the destination machin
    e.  Applications referencing this app pool will have configuration issues.
    Microsoft.Web.Deployment.DependencyCheckBlockException: [Error]The AppPoolNotFou
    nd dependency check found the AppPool '7-8' to be in use by the source data but
    not defined in source data or on the destination machine.  Applications referenc
    ing this app pool will have configuration issues.
       at Microsoft.Web.Deployment.DependencyRuleHandler.PreSync(DeploymentSyncConte
    xt context)
       at Microsoft.Web.Deployment.DeploymentSyncContext.ProcessSync(DeploymentObjec
    t destinationObject, DeploymentObject sourceObject)
       at Microsoft.Web.Deployment.DeploymentObject.SyncToInternal(DeploymentObject
    destObject, DeploymentSyncOptions syncOptions, PayloadTable payloadTable, Conten
    tRootTable contentRootTable)
       at Microsoft.Web.Deployment.DeploymentObject.SyncTo(DeploymentProviderOptions
     providerOptions, DeploymentBaseOptions baseOptions, DeploymentSyncOptions syncO
    ptions)
       at MSDeploy.MSDeploy.Execute()
       at MSDeploy.MSDeploy.Main(String[] unusedArgs)
    Error count: 2

     

    when i run:

    ---------------------

    C:\Program Files\IIS\Microsoft Web Deploy>msdeploy -verb:sync -source:manifest=7
    -8.xml,computername=\\server-002 -dest:manifest=7-10.xml,computername=\\webdev-0
    02 -whatif -enableLink:AppPoolExtension -debug -enableLink:ContentExtension > ms
    deploysync.log

     

    Does Server-002 require a MSDEPLOY install?

  • 06-17-2009, 4:10 PM In reply to

    • kateroh
    • Top 50 Contributor
    • Joined on 10-27-2008, 11:19 PM
    • Posts 137

    Re: How to copy the actual files & database for a server to another.

    Yes, you need to install MSDeploy on your destination (same version as in the source). You will also need to make sure MSDeploy agent is started on the remote machine:
        net start msdepsvc

    You can refer to the Remote section of this article: Troubleshooting Common MSDeploy Issues

    Also, your destination manifest file should be on the remote machine, so you should specify the physical path of the destination manifest in -dest:manifest.

    Thanks,
    Katerina Rohonyan, SDET, Microsoft IIS Team
  • 06-17-2009, 4:37 PM In reply to

    • spyinsky
    • Not Ranked
    • Joined on 06-17-2009, 10:56 AM
    • Posts 13

    Re: How to copy the actual files & database for a server to another.

    Thanks, I did install it on my Server now.

    my source & destination are both same...its is my server which I am trying to access it remotely.

    I tried to copy the files from ONE folder to another, and was successful with the following :

     msdeploy -verb:sync -source:dirpath=C:\xxxxx\7-8,computerName=\\server-002 -dest:dirpath=C:\xxxxx\7-10,computerName=\\server-002

     But when I try to acess it though the AppPool by the following:

     msdeploy -verb:sync -source:manifest=7-8.xml,computername=\\server-002 -dest:manifest=7-10.xml,computername=\\server-002 -enableLink:AppPoolExtension -enableLink:ContentExtension > msdeploysync.log

     I get this error:

    -----------

    Error:  The AppPoolNotFound dependency check found the AppPool '7-8' to be in us
    e by the source data but not defined in source data or on the destination machin
    e.  Applications referencing this app pool will have configuration issues.
    Error:  [Error]The AppPoolNotFound dependency check found the AppPool '7-8' to b
    e in use by the source data but not defined in source data or on the destination
     machine.  Applications referencing this app pool will have configuration issues
    .
    Error count: 2

    ----------

     Why do you think I am unable to access the AppPool 7-8

  • 06-18-2009, 2:23 PM In reply to

    • kateroh
    • Top 50 Contributor
    • Joined on 10-27-2008, 11:19 PM
    • Posts 137

    Re: How to copy the actual files & database for a server to another.

    It turns out that this is a bug in RC that will be fixed in RTW release.
    For now, as a workaround, you can disable the dependency check and proceed with the sync:

    -dependencyFailureLevel:off

    Thank you for reporting the issue!

    Thanks,
    Katerina Rohonyan, SDET, Microsoft IIS Team
  • 06-19-2009, 3:03 PM In reply to

    • spyinsky
    • Not Ranked
    • Joined on 06-17-2009, 10:56 AM
    • Posts 13

    Re: How to copy the actual files & database for a server to another.

    any cookies for me :)

  • 06-22-2009, 11:38 AM In reply to

    • spyinsky
    • Not Ranked
    • Joined on 06-17-2009, 10:56 AM
    • Posts 13

    Re: How to copy the actual files & database for a server to another.

    -dependencyFailureLevel:off did not work for me, i get the same error again.

    I get the same error:

    Error:  The AppPoolNotFound dependency check found the AppPool 'xxxx' to be in use by the source data but not defined in source data or on the desti
    nation machine.  Applications referencing this app pool will have configuration
    issues.
     

     

  • 06-22-2009, 5:17 PM In reply to

    • spyinsky
    • Not Ranked
    • Joined on 06-17-2009, 10:56 AM
    • Posts 13

    Re: How to copy the actual files & database for a server to another.

    The WhatIF flag throws the error.

     BUT

    It actually works! thanks Katerina!

Page 1 of 1 (12 items)
Microsoft Communities