Code:
sudo rsync -Havcn /home/user/disk1/folder/ /home/user/disk2/folder_backup/ >> log.txt
The files listed in log.txt do not match (either are not copied or are different).
Please notice the special meaning of a trailing slash in the specification of the source in rsync
Code:
rsync -avz foo:src/bar/ /data/tmp
A trailing slash on the source changes this behavior to avoid creating
an additional directory level at the destination. You can think of a
trailing / on a source as meaning "copy the contents of this directory"
as opposed to "copy the directory by name", but in both cases the
attributes of the containing directory are transferred to the contain‐
ing directory on the destination. In other words, each of the follow‐
ing commands copies the files in the same way, including their setting
of the attributes of /dest/foo:
rsync -av /src/foo /dest
rsync -av /src/foo/ /dest/foo
Edit: If you are not synchronizing, only copying, you need not worry about extra files in the target (files not matching corresponding files in the source).
Bookmarks