easily copy data between hard drives that have connection issues
This script lets you copy files and directories, using rsync, between one or even two hard drives, and will restart if the drives are unplugged and replugged for some reason.
Only tested on MacOS Ventura. Ubuntu support is in the works.
Copy all files from the drive located at /dev/disk3s1
to a backup directory at /backups
, with a timeout of 1 hour:
./backup -s /dev/disk3s1 -d /backups -t 60
For more options, run ./backup --help
.