TiDB Cluster Log Backup Failure

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: tidb集群日志备份失败

| username: TiDBer_djgos04V

[Test Environment for TiDB]
Failure when starting log backup, the error command is:

tiup br log start --task-name=pitr --pd "192.168.246.128:2379" --storage 'local:///nfs/data/log-backup'

The error message is:

[2023/08/28 10:19:41.096 +08:00] [INFO] [collector.go:77] ["log start failed summary"] [total-ranges=1] [ranges-succeed=0] [ranges-failed=1] [unit-name="log start"] [error="failed to check gc safePoint, ts 443729366923870209: GC safepoint 443859160963219456 exceed TS 443729366923870209: [BR:Backup:ErrBackupGCSafepointExceeded]backup GC safepoint exceeded"] [errorVerbose="[BR:Backup:ErrBackupGCSafepointExceeded]backup GC safepoint exceeded\nGC safepoint 443859160963219456 exceed TS 443729366923870209\ngithub.com/pingcap/tidb/br/pkg/utils.CheckGCSafePoint\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/pkg/utils/safe_point.go:78\ngithub.com/pingcap/tidb/br/pkg/task.(*streamMgr).setGCSafePoint\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/pkg/task/stream.go:389\ngithub.com/pingcap/tidb/br/pkg/task.RunStreamStart\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/pkg/task/stream.go:596\ngithub.com/pingcap/tidb/br/pkg/task.RunStreamCommand\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/pkg/task/stream.go:529\nmain.streamCommand\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/cmd/br/stream.go:232\nmain.newStreamStartCommand.func1\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/cmd/br/stream.go:70\ngithub.com/spf13/cobra.(*Command).execute\n\t/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:940\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\t/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:1068\ngithub.com/spf13/cobra.(*Command).Execute\n\t/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:992\nmain.main\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/cmd/br/main.go:58\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:250\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1598\nfailed to check gc safePoint, ts 443729366923870209"]
Error: failed to check gc safePoint, ts 443729366923870209: GC safepoint 443859160963219456 exceed TS 443729366923870209: [BR:Backup:ErrBackupGCSafepointExceeded]backup GC safepoint exceeded
| username: TiDBer_vfJBUcxl | Original post link

After pausing the log backup task, in order to prevent the MVCC data that generates change logs from being GC’d, the pause task program will automatically set the current backup point checkpoint as the service safepoint, allowing the retention of MVCC data from the last 24 hours. When it exceeds 24 hours and the MVCC data at the backup point checkpoint has been GC’d, the program will refuse to resume the backup task.

The handling method for this scenario is: first execute the br log stop command to delete the current task, then execute br log start to recreate a new log backup task, and at the same time perform a full backup to facilitate subsequent PITR recovery operations.

| username: zhanggame1 | Original post link

First, extend the GC time, for example, to 24 hours. Then, perform a full database backup and start the log backup.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.