Access Atlas Daily Term Store Backups
Atlas 3.0 introduced Term Store backups, automatically created on a daily basis. These are stored for six months by default (this retention timeline is configurable). Any unintended changes made to the taxonomy, including accidental deletion, is now easily dealt with by simply restoring the saved taxonomy. The backup is stored in a SharePoint Document Library, protecting backup files further with version history and the standard SharePoint recycled bin policies.
This is considered an Advanced IT task and will involve running PowerShell scripts.
Pre-Requisites
Permissions
- SharePoint Admin and Term Store Admin
- Global Admin
PowerShell scripts
- Common Utilities.ps1
- Taxonomy-Import-TermGroup-Xml.ps1
Backup file
- Modifications required
PowerShell Script Setup
We provide a set of PowerShell Scripts to carry out Taxonomy Imports into your SharePoint Environment.
You will need to download the following scripts into a folder in your computer:
- Common Utilities.ps1
- Taxonomy-Import-TermGroup-Xml.ps1
You will also need to create two folders in the same location where the above two files are located:
- Input – This folder will contain the xml files with the Taxonomies to import.
- Output – This folder will be used to generate log files of the Taxonomy Import executions, which may aid in troubleshooting error messages during execution of the import script.
Below image shows how the scripts and folders should be setup on your computer.
Access Atlas Daily Term Store Backups
Atlas carries out daily Term Store Backups automatically. These can be found in the Atlas Configuration Site. This is normally found in one of the following URLs:
https://<tenant>.sharepoint.com/sites/atlasconfiguration
or
https://<tenant>.sharepoint.com/teams/atlasconfiguration
In your browser go to Settings – Site Contents.
From the Contents page click on the Atlas Configuration Files folder.
From the Contents page click on the Atlas Configuration Files folder.
Then click into the folder Term store backups.
Select the Zip file of the Term Store Backup for the day you wish to restore and click Download.
Once you have downloaded the zip file you can uncompress its contents and place this in the Input Folder where the PowerShell Script is located.
Modify the Term Store Backup XML File
Before we run the Import Taxonomy Script we will have to make some modifications to the Term Store Backup XML file. This can be done with any editor, but we recommend that you use notepad++ for this.
The files displays in Notepad++ as:
The first few rows (apart from row 2) will need to be deleted:
On row 2, replace "Provisioning" with "TermGroups"
Before change:
After change:
Rows will also need to be deleted towards the end of the file. The ATLAS daily backup routine captures both the Atlas and Atlas Navigation Term Groups. In this article we are restoring the Terms in the Atlas Term Group, we can delete this whole Atlas Navigation section:
Delete from <pnp:TermGroup Name="Atlas Navigation"… to </pnp:TermGroup>
Lastly the closing tags need to be removed.
Delete:
</pnp:ProvisioningTemplate>
</pnp:Templates>
</pnp:Provisioning>
NOTE: Please ensure </pnp:TermGroups> is not removed and delete just what is highlighted in green below:.
image shows how this last section should be left after the changes.
The following image shows how this last section should be left after the changes.
NOTE: If using the editor Notepad++ we can then validate the xml code to verify it is OK. From Plugins – XML Tools – Check XML syntax.
Run the script
To execute the Taxonomy-Import-TermGroup-xml.ps1 script you will need to:
- Open PowerShell
- Navigate to the file location of where the scripts are held, (for example: cd "C:\Atlas\utilities\Taxonomy-Import")
- The Taxonomy-Import-TermGroup-xml.ps1 script will require 3 parameters to be provided:
- -TenantAdminURL: This is the URL of your SharePoint Admin site (https://<domain>-admin.sharepoint.com)
- -UserName: The UPN of the account that will run the import. This account should be SharePoint Administrator and Term Store Administrator of the SharePoint Site.
- -FileName: The name of the XML file you wish to Import (without the full path to the Input folder).
Once executed the script will prompt for credentials and carry out the XML file Import. Output should be similar to the below image.
The import can take a few minutes to complete.
If you have any questions on the above, do please ask your CSA or reach the team on support@clearpeople.zendesk.com
Comments
0 comments
Please sign in to leave a comment.