I use Resilio Sync to backup my iPhone’s Photo library to a Raspberry Pi. The folder on my Raspberry Pi is mirrored to an external HDD and to encrypted folders on Google Drive and OneDrive. This is in addition to iCloud back-up.