`fdbrestore` with --remove-prefix and --keys fails on error: "begin or end of key range does not start with removePrefix"

When I call fdbrestore with `–keys ‘\x025 \x025\xff’ --remove-prefix ‘\x025’ I get the following failure:

Assertion restoreRange.begin.startsWith(removePrefix) && restoreRange.end.startsWith(removePrefix)

What am I doing incorrectly here? For context what I want to do is restore all of the data from a backup of cluster1 stored under a particular directory (i.e. with the prefix \x025) and remove the prefix before restoring it to a different cluster2 that has a different prefix associated with that same directory.

1 Like

Did you solve your problem in any way?

It seems that remove-prefix and add-prefix do not accept escaping in the way keys does, so maybe it is the issue with your command.

We ran into this. This was previously filed as Many problems about fdbrestore --remove_prefix · Issue #1537 · apple/foundationdb · GitHub

I wrote up a quick PR to fix this issue. Hex decode add-prefix and remove-prefix for fdbrestore. by newhook · Pull Request #11344 · apple/foundationdb · GitHub

1 Like