案例说明:
执行sys_rman物理备份时,读取backup.info、backup.info.copy文件失败,sys_rman进程异常,无法正常结束服务,进程无法退出,阻塞新的备份任务。
适用版本:
KingbaseES V8R6
一、问题现象
如下所示,sys_rman备份结束时,读取backup.info、backup.info.copy文件失败,sys_rman进程异常:
sys_rman进程未正常结束,阻塞新的备份进程:
二、问题分析
如下所示,在执行sys_backup.sh init时,将创建repo-path的目录,目录文件包括backup.info、backup.info.copy:
[kingbase@node208 kingbase]$ pwd
/home/kingbase/kbbr01_repo/backup/kingbase
[kingbase@node208 kingbase]$ ls -lh
total 16K
drwxr-x--- 3 kingbase kingbase 4.0K Dec 20 17:48 20241220-174841F
drwxr-x--- 3 kingbase kingbase 4.0K Dec 20 17:48 backup.history
-rw-r----- 1 kingbase kingbase 1.2K Dec 20 17:48 backup.info
-rw-r----- 1 kingbase kingbase 1.2K Dec 20 17:48 backup.info.copy
lrwxrwxrwx 1 kingbase kingbase 16 Dec 20 17:48 latest -> 20241220-174841F
backup.info文件信息:
如下所示,文件记录了备份信息,在备份结束时将被更新:
[kingbase@node208 kingbase]$ cat backup.info
[backrest]
backrest-format=5
backrest-version="2.27"
[backup:current]
20241220-174841F={"backrest-format":5,"backrest-version":"2.27","backup-archive-start":"000000010000000000000005","backup-archive-stop":"000000010000000000000006","backup-error":false,"backup-info-repo-size":109055009,"backup-info-repo-size-delta":109055009,"backup-info-size":109055009,"backup-info-size-delta":109055009,"backup-timestamp-start":1734688121,"backup-timestamp-stop":1734688125,"backup-type":"full","db-id":1,"option-archive-check":true,"option-archive-copy":true,"option-backup-standby":false,"option-checksum-page":false,"option-compress":false,"option-hardlink":false,"option-online":true}
[db]
db-catalog-version=202311131
db-control-version=1201
db-id=1
db-system-id=7450424638434570612
db-version="12"
db-page-size=8192
db-wal-segment-size=16777216
db-segment-size=1073741824
[db:history]
1={"db-catalog-version":202311131,"db-control-version":1201,"db-page-size":8192,"db-segment-size":1073741824,"db-system-id":7450424638434570612,"db-version":"12","db-wal-segment-size":16777216}
如果以上文件无法读取,原因可能是磁盘故障或文件出现异常。经检查,因为磁盘空间满,客户将repo-path下相关目录删除,导致文件无法读取。
三、问题解决
重新执行sys_backup.sh init备份目录。
四、总结
对于执行sys_backup.sh init后,创建的repo-path的备份目录,其中文件不能手工清理,文件丢失将影响正常的物理备份的执行。