Description
What are the problems?
pg_rman follows the backup process when acquiring an incremental backup.
1. Find the last full backup.
2. Find the last incremental backup.
It finds the last full backup and incremental backup and checks if it is possible to acquire the current incremental backups.
However, if a physical backup file is deleted(rm command, etc.) other than the pg_rman delete command of pg_rman, It cannot find the correct status of a full backup and incremental backup.
An example is below.
currently backup status
12:03 INCREMENT BACKUP
12:02 FULL BACKUP
12:01 INCREMENTAL BACKUP
12:00 FULL BACKUP
If we delete 12:02 FULL BACKUP using the rm command, the following backup list is displayed.
12:03 INCREMENT BACKUP
12:01 INCREMENTAL BACKUP
12:00 FULL BACKUP
In this situation, if you try to acquire an incremental backup, it finds full backup at 12:00 and performs an incremental backup based on the backup at the last incremental backup 12:03.
However, the new incremental backup obtained is an abnormal backup file and becomes an unusable backup file.
Cause of the problem
pg_rman doesn't have any elements to show the chaining? between a full backup and incremental backup.
It is just a written timeline, lsn, and backup time at pgBackup structure.
Therefore, it is impossible to check whether the incremental and full backups are the correct set.
Solutions
So far, NO ideas are being considered.
I think it will improve it by adding something that can give the chaining? of each backup(full and incremental) to the structure of pgBackup.
However, if the solution is solved in this way, a problem may occur in which so cannot use the backup file obtained before the improvement.
Note
If the problem is improved by changing the structure, it would be good to add an option to check the crc for each backup file automatically.
In other words, when It is cannot use the backup file due to a physical issue of the hardware(disk err, etc.), it seems to be very convenient in terms of usability if an error of something is displayed.
any good ideas?
Best regards.
Moon.