Escape Masking
Many Data Protection endpoints address backed-up items by their path — for
example the pathRoot parameter on
Search Backup, the <Path> elements
in a restore job, and the path parameter on
Resolve Path. These paths use
escape masking: characters that would otherwise be ambiguous inside a path
segment are replaced with escape sequences.
Character escaping
Escaping applies to characters inside an individual path segment — not to the
/ separators between segments. Replace each of the following characters before
assembling the path:
| Character | Replacement |
|---|---|
- | -- |
: | -c |
/ (within a segment, e.g. a URL used as a segment) | -s |
Every replacement starts with -, so - acts as the escape character. That is
why a literal - must be doubled to -- — otherwise it would look like the
start of an escape.
The / separators between path segments are left as-is. Only a / that is part
of a value within a segment (such as a SharePoint site URL) is masked as -s.
Examples
GUID (Groups & Teams):
A group is addressed by its GUID with each - escaped as --:
Code
URL as a segment (SharePoint site):
A SharePoint site is addressed by its full URL, masked into a single segment:
Code
Here : becomes -c and each / inside the URL becomes -s
(https:// → https-c-s-s, /sites → -ssites, /allcompany → -sallcompany).