Is there a way to keep my RPi File System in sync with a directory on my Mac? Can I do this with rsync? (I write most code on the RPi, and would like a copy of it on my Mac, in case I corrupt the SD card)
The simple answer is No.
If you search you will find a couple of posts on this. I tried unsuccessfully for some time.
It is possible to
rsync your Home, but in general it will not work.
There are a couple of reasons for this;
rsyncdiffers quite significantly between Unix and Linux
- The users differ between the systems, making permissions difficult.
- The most significant reason is the restrictions macOS imposes due to SIP. It simply refuses to allow access to certain directories e.g.
You may be able to
rsync certain directories on the Pi, provided they are normal user directories, with no special access restrictions.
I suggest you try other options;
netatalk on the Pi allows you to access from
ftp is also a useful.
In general macOS does not like files with execute permissions and refuses to edit
bash scripts, even though they are plain text.