Is
rsync(1) - for which there are web, as well as GUI, front-ends - of no use ?? ... It's invariably better not to re-invent the wheel unless there's either no alternative or an educational/learning need.
A user level that continues to overstate my experience :-))