We have two external hard disks that we use to keep backups of our data.
The way we do that is by using the command
rsync that makes our life easy.
Specifically, we use the following command to synchronize the first hard disk with the second one:
rsync -avh --delete --progress "path/to/source/" "path/to/destination/";
rsyncis a fast, versatile, remote (and local) file-copying tool, it is available in almost every system (GNU/Linux, Unix (MacOS as well) and Windows).
The parameters we use are the following:
--archiveenables archive mode which is equal to
In more detail it enables all of the following options
--recursiverecurse into directories
--linkscopy symlinks as symlinks
--timespreserve modification times
--ownerpreserve owner (super-user only)
--devicespreserve device files (super-user only)
--specialspreserve special files
--verboseit increases verbosity of the output
--human-readableoutputs numbers in a human-readable format
--deletedeletes extraneous files from destination directories
--progressshows progress during transfer