Is there a script to move lists/libraries from one content db to another? We're in the process of cleaning up our prd. env. and put it in the archive content db i've created. I'd like to do this using a powershell script.
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It only takes a minute to sign up.Sign up to join this community
You cannot move list/libraries from one content DB to another, in fact you cannot move subsite also. Only movement which can happen from one Content DB to another is Site collection. You can only move site collection from one database to another.
Alternately what you can do is copy site collection to another site collection(mere a copy) and then delete your unnecessary list/libraries from prod site. Your copy site will still have that list/libraries whenever required.
Moving into content db operation is only applicable for the Site collection not for the subsite or list /libraries.
You can clone the existing site collection into new Continent db with different url. either use the backup & restore method for site collection or copysite method.
Another workaround, create a new site collection into new content DB then use the export-spweb to export the list/lib/subsite from live site and then use import-spweb to import it into the archive site collection