# Restoring key range from backup

**URL:** <https://forums.foundationdb.org/t/restoring-key-range-from-backup/4098>\
**Category:** Using FoundationDB\
**Created:** [August 7, 2023, 7:36am UTC](https://forums.foundationdb.org/t/restoring-key-range-from-backup/4098 "2023-08-07T07:36:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hbs](https://sea1.discourse-cdn.com/foundationdb/user_avatar/forums.foundationdb.org/hbs/32/1419_2.png) [@hbs](https://forums.foundationdb.org/u/hbs)\
**Post date:** [August 7, 2023, 7:36am UTC](https://forums.foundationdb.org/t/restoring-key-range-from-backup/4098/1 "2023-08-07T07:36:36Z")

</div>

I am attempting to restore a small key range within a large key space with on the fly prefix change.

The `fdbrestore` call fails with that assertion being false:

```auto
restoreRange.begin.startsWith(removePrefix) && restoreRange.end.startsWith(removePrefix) failed @ /home/foundationdb_ci/src/oOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOo/foundationdb/fdbclient/FileBackupAgent.actor.cpp 4699

```

Is the list of ranges being iterated on built based on the range files present under `kvranges` in the backup?
