I want to backup a List of Sharepoint 2010 using the powershell.
I can backup the list using the central Administration and can also backup the whole Site using
Export-SPWeb -Identity http://siteurl:22222/en-us -Path \\public\backup.cmp
But when I try to export a specific List (with the path that is also shown using the Central Administration):
Export-SPWeb -Identity http://siteurl:22222/en-us/Lists/MyList -Path \\public\backup.cmp
I receive the error:
"The URL provided is invalid. Only valid URLs that are site collections or sites are allowed to be exported using stsadm.exe"
I also tried
Export-SPWeb -Identity http://siteurl:22222/en-us -Path \\public\backup.cmp -ItemURL
http://siteurl:22222/en-us/Lists/MyList
getting the same error
Thanks in advance
To restore a SharePoint farm and web applications, go to Backup and Restore page as shown below. Click on the Restore from a backup link to go to restore page. On the first step of restore, specify the shared location where you have stored the backup and click on the Refresh button.
On the Site collection backup page, select the site collection from the Site Collection list. Type the local path of the backup file in the Filename box. If you want to reuse a file, select the Overwrite existing file check box. Click Start Backup.
Try to fiddle with the ItemUrl
parameter value:
Export-SPWeb -Identity http://siteurl:22222/en-us -Path \\public\backup.cmp
-ItemUrl /Lists/MyList
or
Export-SPWeb -Identity http://siteurl:22222/en-us -Path \\public\backup.cmp
-ItemUrl /en-us/Lists/MyList
or
Export-SPWeb -Identity http://siteurl:22222/en-us -Path \\public\backup.cmp
-ItemUrl "/Lists/MyList"
Different sources show different syntax:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With