laurent22 / rsync-time-backup

Time Machine style backup with rsync.
3.38k stars 446 forks source link

Questions: Backup are not incremental - Entire 50GB folder always copied #215

Open davide-moroni opened 4 years ago

davide-moroni commented 4 years ago

Hi, i'm sorry if i'm not understanding well the mechanism implemented but i tried doing three consecutive backup of same folder with this command, and every times the script copies all files multiplying the space used every time.

/Users/david/rsync-time-backup/rsync_tmbackup.sh -p 22 /Users/david/Documents/Immagini/ pi@raspberrypi:/mnt/NAS01P2/ > /Users/david/backup_cron.log

I executed the command three times, each time waiting 10 minutes after last launch.

Thank you Best Regards Davide

davide-moroni commented 4 years ago

These are the size of the two backup folders, the second was done one day after the first one.

Why it is not incrermental?

pi@raspberrypi:/mnt/NAS01P2 $ du -h --max-depth=1 101G ./2020-06-06-230800 101G ./2020-06-07-230802

odinian commented 3 years ago

I'm just evaluating the software for the first time, but if it's using hard links, then the OS will report full file size for both hard links, but actual disk space will not be used twice. A hard link is a just a pointer to actual data on disk. Just explanation here https://stackoverflow.com/questions/185899/what-is-the-difference-between-a-symbolic-link-and-a-hard-link

ChiefMedicalOfficer commented 3 years ago

I seem to be having a similar issue on Ubuntu 20.04.

ls -i is showing different inode values for the same across backup directories.

cron entry 5 4 * * * if grep -qs /media/8tb /proc/mounts; then /home/chief/rsync-time-backup/rsync_tmbackup.sh /home /media/8tb/backups/rsync_time_machine ~/rsync-time-backup/excluded-patterns.txt; fi

Excluded patterns file - .cache/

I feel it's just something I haven't thought of.

haemi commented 2 years ago

I don't think hard links are created; this is from a folder where nothing has changed at all CleanShot 2022-01-16 at 14 52 04@2x

Shouldn't the count be > 1 there?

haemi commented 2 years ago

hm... my behavior seems to be because it's a directory in the iCloud Drive / within Mobile Documents...

laurent22 commented 2 years ago

It would make sense if they disable hard links within iCloud Drive because most likely they consider each file to be globally unique.