You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
I ran into an old space restore error recently on a Confluence 7.15.1 (datacenter):
Import failed. Check your server logs for more information. com.atlassian.confluence.importexport.ImportExportException: Unable to complete import: An invalid XML character (Unicode: 0xb) was found in the CDATA section.
This is just a post of solution notes using PowerShell to resolve the issue.
Known Confluence bug: Unable to complete import: An invalid XML character (Unicode: 0xffff) was found in the CDATA section
Identifying Invalid Characters: https://confluence.atlassian.com/confkb/how-to-identify-invalid-characters-on-a-confluence-page-911180364.html
Removing Invalid Characters: https://confluence.atlassian.com/jira/removing-invalid-characters-from-xml-backups-12079.html
Unicode Lookup: https://unicodelookup.com/#0xb/1
Using a Window's OS computer, leverage the use of a PowerShell and PowerShell script to remove the invalid characters from the Entities.xml and re-zip the restore file.
Content of PowerShell script:
$yourfile = "C:\Users\x889390\Downloads\ADTA Wiki Copy\entities.xml"
$outputfile = "C:\Users\x889390\Downloads\ADTA Wiki Copy\entities_clean.xml"
function Repair-XmlString {
[CmdletBinding()]
param(
[Parameter(Mandatory = $true, Position = 0,ValueFromPipeline)]
[ValidateNotNullOrEmpty()]
[string]$String
)
#Write-Host "Cleaning string for XML parsing [String: $($String)]"
$rPattern = "[^\x09\x0A\x0D\x20-\xD7FF\xE000-\xFFFD\x10000\x10FFFF]"
$cleaned = $String -replace $rPattern, ''
#Write-Host "Returning parsed string [String cleaned: $($cleaned)]"
return $cleaned
}
Repair-XmlString (Get-Content $yourfile -Raw) |Set-Content $outputfile
#/get-content -Raw -path $yourfile | out-file $outputfile -encoding utf8
https://powershellexplained.com/2017-07-31-Powershell-regex-regular-expression/