Visit our SharePoint Forum

SharePoint developer? Submit Yourself as Freelancer

Saturday, June 26, 2010

Copy files from one sitecollection to other in sharepoint 2010

Copying files from one site collection to other can be done using Content deployment feature of SharePoint 2010. You can do this either manually or on a predetermined schedule.

Some Important things to Note :
1. Content deployment is a one-way process - Content is copied from a source site collection to a destination site collection.The content deployment feature does not support round-trip synchronization from source to destination and back again.

2. Creating new content or changing existing content on the destination site collection can cause content deployment jobs to fail.

3. You cannot deploy(copy) a site to the same content database as the source site - This is because all the GUIDs that are used to define sites, Web pages, lists, and items are transferred with the site when it is deployed to the destination. For this reason, you cannot deploy a site to the same content database as the source site.

4. The destination site collection must exist before you can deploy content to it, and it must be an empty site collection.You must not specify a template for the site collection. If a template is used to create the site collection, the content deployment job will fail.

5. Before you start any process, you must first configure the destination server for receiving incoming requests or to accept content deployment jobs. This can be done using Content deployment Settings Page.

6. Lastly, Content deployment paths and jobs are created and managed on the Manage Content Deployment Paths and Jobs page in Central Administration.

Now lets talk about the main components

Content deployment paths and jobs - There are two main components of content deployment.

1. The first is a content deployment path, which is a relationship between a source site collection and a destination site collection.
2. The second part is a content deployment job, which is associated with a path and is a collection of settings that are related to the schedule and scope that are followed in deploying that content.

In short, A job is associated with a path, and it defines the specific content that is to be deployed from the source to the destination and the schedule on which the deployment should occur. After you have created the content deployment path, you can specify jobs to run on that path.

The Overall Steps that you need to follow are :

1. Create a source site.
2. Create a new Web application.
3. Create a destination site collection.
4. Enable incoming content deployment jobs.
5. Create a content deployment path.
6. Create a content deployment job.
7. Deploy the source site.
8. Update the source site.
9. Deploy changes.
10. Check the destination site for changes.

See detail explanation of Steps @ Content Deployment Step-By-Step


SharePoint Programming