# BR 的使用 - 全库恢复

__*BR 使用*__
__*BR 全库恢复*__

```
br restore full \
    --pd "${PDIP}:2379" \
    --storage "s3://backup-data/2022-01-30/" \
    --ratelimit 128 \
    --log-file restorefull.log
```
-------------------------------------------------------------
BR 支持在一个空集群上执行快照备份恢复,将该集群恢复到快照备份时刻点的集群最新状态。

用例:将 s3 的名为 backup-data bucket 下的 2022-01-30/ 前缀目录中属于 2022-01-30 07:42:23 时刻点的快照数据恢复到目标机群。

br restore full \
    --pd "${PDIP}:2379" \
    --storage "s3://backup-data/2022-01-30/" \
    --ratelimit 128 \
    --log-file restorefull.log

以上命令中,

--ratelimit:每个 TiKV 执行恢复任务的速度上限（单位 MiB/s）
--log-file:BR log 写入的目标文件
恢复期间还有进度条会在终端中显示,进度条效果如下。当进度条前进到 100% 时,说明恢复已完成。在完成恢复后,BR 为了确保数据安全性,还会校验恢复数据。

br restore full \
    --pd "${PDIP}:2379" \
    --storage "local:///tmp/backup" \
    --ratelimit 128 \
    --log-file restorefull.log
Full Restore <---------/...............................................> 17.12%.