1
votes

i am new to sharepoint. I have few queries on sharepoint deploy ment. it would be nice of you if any one clarify me on these queries.

i have to deploy one sharepoint application/site from one server to another server. there are lot of file like .ascx(created through asp.net), .dll webparts, and workfolwsetc present in the application. how should i deploy all those files fromone server to another. this is for testing ( the other server). also there are more than 10 solution files(containing all the files) exist in the project.

i tried some thing going through different sites like using target, makecab etc but it is bit confusing for me. as there is no manifest file existing in my application and there are more than one solution files exist. do i have to write own manifest file for individual solution or one for the project or it has to be provided by the develepor? what should be the path for the feature,workflow xmls in the ddf. where to deploy the wsp file. also what is the procedure to follow for populating the site after wsp file is deployed in the server.

do i have to recreate all the sites in the destination server?

is there any free tool available which i can use for deployment? if yes then which part we can deploy: web part or workflow?

can we use NAnt for this activity?

thanks in advance.

2
Just to clarify... your post implies that you have not deployed all of your application files in the form of wsp solutions. If he's trying to take some applications that are haphazardly deployed like this and successfully deploy them on another server, what can be done to facilitate that? Seems like a tedious problem.Chris Farmer

2 Answers

1
votes

You can use stsadm to copy the content database from one server to another. This task can definitely be automated with nant (that's what we do).

Using stsadm -o backup, you can create a backup of your content and config databases. Then you restore them with stsadm -o restore. For example:

stsadm -o backup -url http://yoururl -filename prodsite.dat -overwrite

stsadm -o restore -url http://newurl -filename prodsite.dat -overwrite

I highly recommend SharePoint 2007 Administration. It can be very easy to hose a SharePoint installation if you don't know what you're doing.

1
votes

If all your files are in solutions (WSP's) then jsut roll those out to the other server. Then copy the content databases by just making a backup on the sql server of the original content database, restore it on the new environment's database server. Then recreate the web applications on the new machine, specifying the names of the content datbases to correspond with the just restored databases' names. Then deploy solutions to correct web applications.

Edit

// ADDING A WEB.CONFIG MOD

SPWebConfigModification modification = GetModification(key, value);
if (!webApp.WebConfigModifications.Contains(modification))
{
  webApp.WebConfigModifications.Add(modification);
  webApp.Farm.Services.GetValue<SPWebService>().ApplyWebConfigModifications();
  webApp.Update();
}

AND The GetModification method (found this on the internet a while ago)

private static SPWebConfigModification GetModification(string key, string value)
{
  if (string.IsNullOrEmpty(key))
  {
    throw new ArgumentNullException("key", "The key parameter is mandatory");
  }

  if (string.IsNullOrEmpty(value))
  {
    throw new ArgumentNullException("value", "The value parameter is mandatory");
  }

  var modification = new SPWebConfigModification
  {
    Name = String.Format(CultureInfo.InvariantCulture, @"add[@key=""{0}""]", key),
    Path = "configuration/appSettings",
    Value = String.Format(CultureInfo.InvariantCulture, @"<add key=""{0}"" value=""{1}"" />", key, value),
    Owner = Assembly.GetExecutingAssembly().FullName,
    Sequence = 0,
    Type = SPWebConfigModification.SPWebConfigModificationType.EnsureChildNode
  };
  return modification;
}