Sharepoint export site

Sharepoint export site DEFAULT

Export sites, lists, or document libraries in SharePoint Server

APPLIES TO:yes2013 yes2016 yes2019 noSharePoint in Microsoft 365

You can export a site, list, or document library in SharePoint Server by using the SharePoint Central Administration website or Microsoft PowerShell. The backup tool that you use depends on the kind of environment that you have deployed, your backup schedule requirements, and service level agreements that you have made with your organization.

Before you begin

We recommend that you regularly back up the complete farm. However, business or IT requirements might require you to export a site, list, or document library. Regularly exporting sites, lists, and document libraries reduces data losses that might occur from hardware failures, power outages, or other problems. It is a simple process and helps make sure that data is available for recovery, if that is required. You can only export one site, list, or document library at a time.

For information about what to back up and which tools to use, see Plan for backup and recovery in SharePoint Server.

Before you begin this operation, review the following information about prerequisites:

  • Before you begin, you must create a folder on the local computer or the network in which to store the export file. For better performance, we recommend that you export to the local computer and then move the export file to a network folder.

  • You cannot use SQL Server tools or Data Protection Manager to export a site, list or document library.

Use PowerShell to export a site, list, or document library in SharePoint Server

You can use PowerShell to export a site, list, or document library manually or as part of a script that can be run at scheduled intervals.

To export a site, list or document library by using PowerShell

  1. Verify that you have the following memberships:

    • securityadmin fixed server role on the SQL Server instance.

    • db_owner fixed database role on all databases that are to be updated.

    • Administrators group on the server on which you are running the PowerShell cmdlets.

    An administrator can use the Add-SPShellAdmin cmdlet to grant permissions to use SharePoint Server cmdlets.

    Note

    If you do not have permissions, contact your Setup administrator or SQL Server administrator to request permissions. For additional information about PowerShell permissions, see Add-SPShellAdmin.

  2. Start the SharePoint Management Shell.

  3. At the PowerShell command prompt, type the following command:

    Where:

    • <SiteURL> is URL for the site, list, or library that you are exporting.

    • <Path and FileName> is path and name for the site, list, or library that you are exporting.

    • <URL of Site, List, or Library> is the URL for the site, list, or library where you are exporting.

    If you are exporting a large site, list, or document library, you can use the parameter. When this parameter is used, the site collection is marked as deleted, which immediately prevents any further access to its content. The data in the deleted site collection is then deleted gradually over time by a timer job instead of at one time, which reduces its effect on the performance of farm servers and SQL Server.

    To specify which version of the site, list, or document library to include, use the parameter and specify "LastMajor" (default), "CurrentVersion", "LastMajorandMinor", or "All". To include the user security settings with the list or document library, use the parameter. If you want to overwrite the file that you specified, use the parameter. To view the progress of the backup operation, use the parameter.

    The parameter lets you specify that no file compression is performed during the export process. Using this parameter can lower resource usage up to 30% during the export process. Using this parameter will result in a backup folder being created instead of a compressed file. If you use the parameter in the command, you must also use it when you import the content by using the command.

For more information, see Export-SPWeb.

Note

We recommend that you use Microsoft PowerShell when performing command-line administrative tasks. The Stsadm command-line tool has been deprecated, but is included to support compatibility with previous product versions.

Use Central Administration to export a site, list, or document library in SharePoint Server

You can use Central Administration to export a site, list, or document library. You can only export one site, list, or document library at a time.

To export a site, list, or document library by using Central Administration

  1. Verify that the user account that is performing this procedure is a member of the Farm Administrators group.

  2. Start Central Administration.

  3. In Central Administration, on the home page, click Backup and Restore.

  4. On the Backup and Restore page, in the Granular Backup section, click Export a site or list.

  5. On the Site or List Export page, in the Site Collection section, select the site collection from the Site Collection list, and then select the site from the Site list.

  6. If you are exporting a site, skip this step, Select the list or document library from the List list.

  7. In the File Location section, in the Filename box, type the UNC path of the shared folder and the file to which you want to export the list or document library. The file name must use the .cmp extension.

  8. If the file already exists and you want to use this file, select the Overwrite existing files check box. Otherwise, specify a different file name.

  9. If you want to export all the security and permissions settings with the list or library, in the Export Full Security section, select the Export full security check box.

  10. If you want to specify which version of the list or library to export, select one of the following versions from the Export versions list:

    • All Versions

    • Last Major

    • Current Version

    • Last Major and Last Minor

  11. When you have specified the settings that you want, click Start Export.

  12. You can view the status of all backup jobs at the top of the Granular Backup Job Status page. You can view the status of the current backup job in the Content Export section of the page. The status page updates every 30 seconds automatically. You can manually update the status details by clicking Refresh. Backup and recovery are Timer service jobs. Therefore, it may take several seconds for the backup to start.

    If you receive any errors, you can review them in the Failure Message column of the Backup and Restore Job Status page. You can also find more details in the <file name>.export.log file at the UNC path that you specified in step 6.

See also

Concepts

Plan for backup and recovery in SharePoint Server

Other Resources

Use Windows PowerShell to administer SharePoint Server

Sours: https://docs.microsoft.com/en-us/sharepoint/administration/export-a-site-list-or-document-library

Export-Import subsite using PowerShell in SharePoint 2013

How to export SharePoint subsite? Export subsite SharePoint 2013 PowerShell, Unlike SharePoint 2013, you’ll have to create a subsite first and then import. Export-SPWeb cmdlet used to export a subsite, list, or document library.

Open SharePoint 2013 Management Shell and run this command. Change Site URL and Path values accordingly.

Export-SPWeb "http://sharepoint.company.com/sites/Sales/US/" ` -Path "C:\sales-us.cmp" -IncludeVersions All -includeusersecurity

To export a site, list, or document library by using Central Administration:

You can also export a Subsite from SharePoint 2010/2013/2016 Central Administration via “Export a site or list”  capability. Go to SharePoint Central Administration >> Backup and Restore >> Click on the “Export a site or list” link under the “Granular Backup” group.

Export subsite sharepoint 2013 powershell

Important: Both the source and destination sites should be using same template!

Import subsite in SharePoint 2013 using PowerShell

Import-SPWeb PowerShell cmdlet used to import a sub site from backup.

Import-SPWeb "http://sharepoint.company.com/sites/Sales/US/" ` -Path "C:\sales-us.cmp"  -includeusersecurity -UpdateVersions overwrite

With these cmdlets, we can Export and Import a particular subsite, list, or document library. You can also use Export-SPWeb & Import-SPWeb cmdlets to copy the list with data between SharePoint Sites/Web Apps/or between different environments. For E.g. Copy a SharePoint list from Dev to a staging server.

Please note, export-import is not the same as backup-restore. Certain artifacts will not be copied during export-import. Such as:

  • Workflow association-data
  • Audit logs
  • Recycle bin items
  • Created By, Modified By details, etc.

Related Posts

Sours: https://www.sharepointdiary.com/2015/09/export-import-subsite-in-sharepoint-using-powershell.html
  1. Stardew valley feet
  2. 3mm visco fuse
  3. 0 gauge splitter

Search My Blog

If you remember classic SharePoint, it had that nice looking (and yet unreliable sometimes) feature called “SharePoint Site Structure” which was eventually deprecated as move & copy functions were introduced. This was very insightful to understand the site and content hierarchy across the entire SharePoint farm.site-content-and-structure1

However, let’s assume you want to review your modern day SharePoint Online hierarchy every once in a while, and make sure your sites, libraries and lists are aligning to best practices as far as the depth of the site levels? Or, you just want to know what sort of sites exist in your site collection, we still have a manual way of getting those information out using a simple PowerShell script. This may not be the best sophisticated way of getting a handy report which can probably be obtained using a 3rd party tool.

Unless its a test environment, we rarely notice any Office 365 tenant without MFA enabled, so this script is Modern-Auth friendly and supports MFA. You can generate a basic report of all sites, libraries and lists in a specific site collection by defining the site collection name and CSV path to save it.

###Function to Get Lists and Libraries of a web Function Get-SPOSiteInventory([Microsoft.SharePoint.Client.Web]$Web) { Write-host -f Yellow "Getting Lists and Libraries from site:" $Web.URL ###Get all lists and libraries $SiteInventory= @() $Lists= Get-PnPList -Web $Web foreach ($List in $Lists) { $Data = new-object PSObject $Data | Add-member NoteProperty -Name "Site Name" -Value $Web.Title $Data | Add-member NoteProperty -Name "Site URL" -Value $Web.Url $Data | Add-member NoteProperty -Name "List Title" -Value $List.Title $Data | Add-member NoteProperty -Name "List URL" -Value $List.RootFolder.ServerRelativeUrl $Data | Add-member NoteProperty -Name "List Item Count" -Value $List.ItemCount $Data | Add-member NoteProperty -Name "Last Modified" -Value $List.LastItemModifiedDate $SiteInventory += $Data } ###Get All Subwebs $SubWebs = Get-PnPSubWebs -Web $Web Foreach ($Web in $SubWebs) { $SiteInventory+= Get-SPOSiteInventory -Web $Web } Return $SiteInventory } ###Config Variables $SiteURL = "https://sitename.sharepoint.com/sites/PWA" $CSVFile = "C:\temp\filename.csv" ###Get Credentials to connect Try { #Connect to PNP Online Connect-PnPOnline -Url $SiteURL -UseWebLogin ###Get the Root Web $Web = Get-PnPWeb ###Call the function and export results to CSV file Get-SPOSiteInventory -Web $Web | Export-CSV $CSVFile -NoTypeInformation } Catch { write-host "Error: $($_.Exception.Message)" -foregroundcolor Red

As you execute it, you’ll be prompted for credentials and the report will be generated (duration might depend on the number of site collections and the weight of each)

image

image

Original script used in this scenario was published in this article of SharePoint Diary

Like this:

LikeLoading...

Related

Sours: https://mscloudjournal.com/2020/04/02/export-all-sites-libraries-and-lists-of-a-sharepoint-online-site-collection/
How to copy Microsoft SharePoint List to a different Site or Team?

 locked
SharePoint Site Import and Export

SharePoint 2013 - Setup, Upgrade, Administration and Operationshttps://social.technet.microsoft.com/Forums/en-US/056ba29b-2942-4662-b6d5-da6815ae9c89/sharepoint-site-import-and-export?forum=sharepointadminQuestion64/10/2018 9:17:27 AM4/15/2018 8:41:51 AMWelcome to the SharePoint 2013 Setup, Upgrade, Administration and Operations forum. Use this forum to discuss deployment topics for the RTM release version of SharePoint 2013. If you have SharePoint 2013 Preview version questions, you can still ask about Preview for a limited time: http://social.technet.microsoft.com/Forums/en-US/sharepointitpropreview and http://social.msdn.microsoft.com/Forums/en-US/sharepointdevpreview. Deployment questions about SharePoint 2010 can be answered here: http://social.technet.microsoft.com/Forums/en-US/sharepointadminprevious and for previous versions here: http://social.technet.microsoft.com/Forums/en-US/sharepointadminlegacy01

  • Question

  • text/html4/10/2018 9:17:27 AMSP2013Devp0

    I did many times export import site from dev to production in SharePoint 2013 and its works fine.

    To export the site in :-

    Export-SPweb -identity "http://xxx.xxx.xx.local/xxx/" -Path "D:\aa\Bakcup.cmp" -includeUserSecurity -IncludeVersions All

    Above command generated two cmp files not sure why two,1) - Bakcup.cmp   2) Bakcup1.cmp

    To Import the site

    Import-SPWeb -Identity "http://yyy.yyy.yyy.local/yyy" -Path "D:\bb\Bakcup.cmp" -includeUserSecurity

    Today I've created new site collection with different content DB in the same web application in production and trying to export site and Import. 

    For export above command generate two .cmp file (exporting two files for site) not sure why. 

    And for Import above command is giving below error. Please advice.

    Bakcup.cmp

    Bakcup1.cmp


    • Edited bySP2013DevpTuesday, April 10, 2018 9:21 AM

Answers

  • text/html4/13/2018 10:08:34 AMSara Fan0

    Hi SP2013Devp,

    There are methods to export and import site.

    1. Use “Save the site as the template”. We can save the site as template and move the template from dev to production. In production environment, create site from the site template.

    2. Export site from central administration.

    Go to SharePoint Central Administration >> Backup and Restore >> Click on "Export a site or list" link under "Granular Backup" group.

    Move the backup file to another environment and restore the backup file in another environment.

    More reference:

    Backup and restore using Central Admin.

    http://sptrac.com/wordpress/?p=2116

    Best regards,

    Sara Fan


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact [email protected]


    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    • Marked as answer bySP2013DevpSunday, April 15, 2018 8:41 AM

All replies

  • text/html4/10/2018 4:35:38 PMAsfaw Ayele(MCTS, MCP)0

    You're better of using Backup/Restore-SPSite for site collections rather than Import/Export-SPWeb. At the end of command use -Force switch. After that check the usual things like enough disk space to perform the task and running Shell management on elevated privilege.

    You may also get more precise help if you share what you found from ULS.

    Hope this helps

     
    • Proposed as answer bySamyAdelTuesday, April 10, 2018 9:27 PM
  • text/html4/11/2018 8:30:10 AMSara Fan0

    Hi SP2013Devp,

    To troubleshoot the issue, you could delete all cmp files in the aa folder. And export the site again and import again to check if the same issue will occur.

    And give the user enough permission on the folder “aa”.

    Best regards,

    Sara Fan


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact [email protected]


    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

  • text/html4/13/2018 10:08:34 AMSara Fan0

    Hi SP2013Devp,

    There are methods to export and import site.

    1. Use “Save the site as the template”. We can save the site as template and move the template from dev to production. In production environment, create site from the site template.

    2. Export site from central administration.

    Go to SharePoint Central Administration >> Backup and Restore >> Click on "Export a site or list" link under "Granular Backup" group.

    Move the backup file to another environment and restore the backup file in another environment.

    More reference:

    Backup and restore using Central Admin.

    http://sptrac.com/wordpress/?p=2116

    Best regards,

    Sara Fan


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact [email protected]


    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    • Marked as answer bySP2013DevpSunday, April 15, 2018 8:41 AM
Sours: https://social.technet.microsoft.com/Forums/en-US/056ba29b-2942-4662-b6d5-da6815ae9c89/sharepoint-site-import-and-export?forum=sharepointadmin

Export site sharepoint

Export-SPWeb

Exports a site, list, or library.

Syntax

Description

The Export-SPWeb cmdlet exports a site, list, or library. The capability to export from a library is a new feature in SharePoint.

For permissions and the most current information about Windows PowerShell for SharePoint Products, see the online documentation at SharePoint Server Cmdlets.

Examples

--------------------EXAMPLE-----------------------.

This example exports the site at https://site/ to a file called site export.cmp in the current directory.

Parameters

-AppLogFilePath

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-AssignmentCollection

Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects are automatically disposed of if an assignment collection or the Global parameter is not used.

When the Global parameter is used, all objects are contained in the global store. If objects are not immediately used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type:SPAssignmentCollection
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-CompressionSize

Sets the maximum file size for the compressed export files. If the total size of the exported package is greater than this size, the exported package will be split into multiple files.

Type:Int32
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-Confirm

Prompts you for confirmation before executing the command. For more information, type the following command:

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-Force

Forcefully overwrites the export package if it already exists.

The type must be either of the following values:

-True

-False

The default value is False.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-HaltOnError

Stops the export process when an error occurs.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-HaltOnWarning

Stops the export process when a warning occurs.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-Identity

Specifies the URL or GUID of the Web to be exported.

The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a SharePoint site (for example, MySPSite1); or an instance of a valid SPWeb object.

Type:SPWebPipeBind
Position:1
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-IncludeAlerts

Indicates if alerts are turned on.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server 2016, SharePoint Server 2019

-IncludeUserSecurity

Preserves the user security settings.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-IncludeVersions

Indicates the type of file and list item version history to be included in the export operation. If the IncludeVersions parameter is absent, the Export-SPWeb cmdlet by default uses a value of 1.

The type must be any one of the following versions:

-Last major version for files and list items (default)

-The current version, either the last major version or the last minor version

-Last major and last minor version for files and list items

-All versions for files and list items

Valid values are:

All, CurrentVersion, LastMajor, LastMajorAndMinor

Type:SPIncludeVersions
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-ItemUrl

Specifies the URL of the Web application, GUID, or object to be exported.

The type must be a valid URL; for example, https://server_name.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-NoFileCompression

Either enables or disables file compression in the export package. The export package is stored in the folder specified by the Path parameter or Identity parameter. We recommend that you use this parameter for performance reasons. If compression is enabled, the export process can increase by approximately 30 percent.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-NoLogFile

Suppresses the generation of an export log file. If this parameter is not specified, the Export-SPWeb cmdlet will generate an export log file in the same location as the export package. The log file uses Unified Logging Service (ULS).

It is recommended to use this parameter. However, for performance reasons, you might not want to generate a log file.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-Path

Specifies the name of the export file.

If the NoFileCompression parameter is used, a directory must be specified; otherwise, any file format is valid.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-UseSqlSnapshot

Specifies a SQL Database Snapshot will be created when the export process begins, and all exported data will be retrieved directly from the database snapshot. This snapshot will be automatically deleted when export completes.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-WhatIf

Displays a message that describes the effect of the command instead of executing the command. For more information, type the following command:

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition
Sours: https://docs.microsoft.com/en-us/powershell/module/sharepoint-server/export-spweb
How to Export and Import List On Sharepoint

How do you know what's without a bra. asked the elderly man. Yes, I accidentally ran it on the back, and when I bent down into the cut of the dress, I buried the.

You will also like:

Then he said that he just had such a habit since childhood. I said that there was nothing wrong with that, but I really didn't think so. Vlad and I went to practice, we had two days before the first game. After training from the stadium, everyone went to the shower.



606 607 608 609 610