TaxonomyBackup PowerShell Script

The script backs-up complete taxonomy of desired term store including items in the [System] term group. The script backs-up the items and following attributes:
  • TermSet
    • Name
    • Contact
    • Owner
    • Description
    • Stakeholders
    • IsAvailableForTagging
    • IsOpenForTermCreation
    • LastModifiedDate
    • CreatedDate
    • ID
    • CustomSortOrder
  • Term
    • Name
    • Owner
    • Descriptions and Labels for all available languages
    • IsAvailableForTagging
    • IsDeprecated
    • LastModifiedDate
    • CreatedDate
    • ID
    • IsReused
    • ParentTermId
The sripts does not back-up merged ids for a term as it is currently not technicaly fesible to restore them using SharePoint object model. The script does not back-up custom properties.

The script TaxonomyBackup.ps1 should be executed with parameter specifying path to a destination location of the backup XML file.

"Example: ./TaxonomyBackup.ps1 d:\backup\"

If the part parameter is not specified the following error message is returned:
"ERROR: The specified file path does not exist!"

Before using, modify the script line 99 to include the Central Administration site URL of the farm where the script is going to be executed.

$caURL = "<CentralAdminURL>"

The XML backup file is saved with automatically generated file name follwoing this pattern:

"d-M-yyyy_H-m-s_mms_bak.xml"

where:
  • d-M-yyyy - date of the backup
  • H-m-s - represents time of the backup
  • mms_bak - suffix indicating the file purpose

TaxonomyRestore PowerShell Script

The script restores complete taxonomy into desired term store and group with the original name. The items in the [System] term group are not restored. The terms, terms sets and term group should not exist in the torm store, otherwise the script return errors and no terms are restored. The script restores the items in the structure with following attributes:
  • TermSet
    • Name
    • Contact
    • Owner
    • Description
    • Stakeholders
    • IsAvailableForTagging
    • IsOpenForTermCreation
    • ID
  • Term
    • Name
    • Owner
    • Descriptions and Labels for all available languages
    • IsAvailableForTagging
    • IsDeprecated
    • ID
    • IsReused
The sripts does not restore merged ids for a term as it is currently not technicaly fesible using SharePoint object model. The script does not restore custom properties.

The script TaxonomyRestore.ps1 should be executed with parameter specifying path to the location of the backup XML file to be restored.

"Example: ./TaxonomyRestore.ps1 d:\backup\d-M-yyyy_H-m-s_mms_bak.xml"

If the part parameter is not specified the following error message is returned:
"ERROR: The specified file path does not exist!"

Before using, modify the script line 187 to include the Central Administration site URL of the farm where the script is going to be executed.

$caURL = "<CentralAdminURL>"

Last edited Nov 19, 2012 at 8:50 PM by BedrichChaloupka, version 9

Comments

No comments yet.