The go to tool for syncing data is rsync. You can sync either at the directory level or just the contents of a directory like so:
Examples
directory sync
24 9 * * * rsync -aEa /home/fan/Data /media/T/
contents sync
24 9 * * * rsync -aEa /home/fan/Data/ /media/T/Data/
The first example will sync the directory Data from /home/fan to the directory /media/T. The second example will sync the contents of Data to the directory /media/T/Data.
As an additional tip I'll sync to target directories using this notation:
24 9 * * * rsync -aEa /home/fan/Data/ /media/T/Data/.
The /. I find more obvious when reading through my rsync commands.
Behavior Examples
Using rsync is probably one of the most confused issues I deal with when training new users.
Sample data:
$ tree home/fan/Data/
home/fan/Data/
|-- file1
|-- file2
|-- file3
|-- file4
`-- file5
1. syncing contents of dir Data
$ rsync -aEa home/fan/Data/ media/T/
Notice we put the contents of Data into T.
$ tree media/T/
media/T/
|-- file1
|-- file2
|-- file3
|-- file4
`-- file5
0 directories, 5 files
2. syncing the directory
$ rsync -aEa home/fan/Data media/T/
Notice we put the directory Data into T.
$ tree media/T/
media/T/
`-- Data
|-- file1
|-- file2
|-- file3
|-- file4
`-- file5
1 directory, 5 files