I am having a difficult time using rsync from my computer to a remote server. I have a folder with a few sub directories and a lot of small files. On my computer the total size of my directory (using du -h
) is 6.4GB. When I try to rsync it to the remote server it seems to work fine but when I check the file size it is only 1.3GB. It looks like all the sub directories are there as well as the files but there are too many files for me to check manually what is missing.
I have also tried using ls -al and ls -l to see the directory sizes. On my computer I get this
(base) MacBook-Pro:LaCie $ ls -al 2year_coarsened_cropped/
total 1024
drwxrwxrwx 1 staff 131072 19 Jun 14:18 .
drwxrwxrwx@ 1 staff 131072 31 Dec 1979 ..
drwxrwxrwx 1 staff 131072 19 Jun 14:32 test
drwxrwxrwx 1 staff 131072 19 Jun 14:23 train
(base) MacBook-Pro:LaCie $ ls -l 2year_coarsened_cropped/
total 512
drwxrwxrwx 1 staff 131072 19 Jun 14:32 test
drwxrwxrwx 1 staff 131072 19 Jun 14:23 train
On the remote server this is what it says
remote:~$ ls -al 2year_coarsened_cropped/
total 16
drwxrwxr-x 4 user 4096 Jul 17 13:51 .
drwxr-x--- 14 user 4096 Jul 17 13:51 ..
drwxrwxr-x 5 user 4096 Jul 17 13:51 test
drwxrwxr-x 5 user 4096 Jul 17 13:51 train
remote:~$ ls -l 2year_coarsened_cropped/
total 8
drwxrwxr-x 5 user 4096 Jul 17 13:51 test
drwxrwxr-x 5 user 4096 Jul 17 13:51 train
I haven't used rsync before I usually use scp but I got the exact same results. I am not sure how or why the size has been reduced this much but if anyone has advice I would greatly appreciate it. My rsync command was just rsync -r -v 2year_coarsened_cropped user@remote:/home/