If a buckle of your backpack is broken, you are very surprised that you don't find spare parts, you only find stick buckle. If you lucky to find the right buckle you have to open the textile belt and then to sew it...not a good idea. It would easier if  the buckle consists of two parts, a body and  an axis. That's a job for a 3D printer. If you have the same problem then just print the two parts. Additionally you only need two M4 screws with a length of 10mm and tap a srew thread in the axis part.

I used PLA filament to print these parts and this repair is three years ago.