使用tiup playground命令在本地启用了一个数据库集群,在test库重创建了表table1并插入了3条数据,使用br备份成功:
[root@localhost bin]# ./br backup full --pd “127.0.0.1:2379” -s “local://tmp/backup” --log-file backupfull.log
Detail BR log in backupfull.log
Full backup <------------------------------------------------------------------------------------------------------------------------> 100.00%
Checksum <---------------------------------------------------------------------------------------------------------------------------> 100.00%
[2021/01/11 02:04:07.984 -05:00] [INFO] [collector.go:60] [“Full backup Success summary: total backup ranges: 1, total success: 1, total failed: 0, total take(Full backup time): 12.029496ms, total take(real time): 98.268306ms, total size(Byte): 87, avg speed(Byte/s): 7232.22, total kv: 3”] [“backup checksum”=2.561914ms] [“backup fast checksum”=181.694µs] [“backup total regions”=1] [BackupTS=422143235961126913] [Size=2857]
继续往table1中插入了3条数据,接着使用br命令进行还原:
[root@localhost bin]# ./br restore full --pd “127.0.0.1:2379” -s “local://tmp/backup” --log-file restorefull.log
Detail BR log in restorefull.log
Full restore <-----------------------------------------------------------------------------------------------------------------------> 100.00%
Error: failed to validate checksum: [BR:Restore:ErrRestoreChecksumMismatch]restore checksum mismatch
报上面的异常,日志文件内容:log.txt (15.9 KB)