You will find plenty of tutorials how to do the opposite. But here is how to use you iDevice as backup drive for times when you have no TimeMachine or other way to backup you Mac locally.
I just bought a cute little Raspberry Pi Zero W as a toy for myself. I don’t intend to use it with a screen or any other peripherals. Just as a generic linux network device to run some services on. Here is how I set it up only using a SD card reader and my macbook. No screen, keyboard or network cable required.