It should work like this.
- sort backup files by suffix, filename-number-(max) filename-number-(max-1) ...... filename-number-min
- let filename-number-(max) be a full copy, and all other files be diff files only
- on creating a backup, save the copy to filename-number-(max+1), calculate the diff between filename-number-(max) and filename-number-(max+1) and save it to filename-number-(max)
- on walking back, apply the diffs sequencially
It should work like this.