When running
rsync -Paz /home/sbird “/run/media/sbird/My Passport/sbird”
As told by someone, I run into a ran out of storage error midway. Why is this? My disk usage is about 385 GiB for my home folder, and there is at least 800 GiB of space in the external SSD (which already has stuff like photos and documents). Does rsync make doubly copies of it or something? That would be kind of silly. Or is it some other issue?
Note that the SSD is from a reputable brand (Western Digital) so it is unlikely that it is reporting a fake amount of storage.
SlurpingPus@lemmy.world 8 hours ago
The simplest explanation for the size difference could be if you have a symlink in your home folder pointing outside it. Idk if rsync traverses symlinks and filesystems by default, i.e. goes into linked folders instead of just copying the link, but you might want to check that. Note also that exFAT doesn’t support symlinks, dunno what rsync does in that case.
It would be useful to run
ls -R >file.txtin both the source and target directories and diff the files to see if the directory structure changed. (The-loption would report many changes, since exFAT doesn’t support Unix permissions either.)As others mentioned, if you have hardlinks in the source, they could be copied multiple times to the target, particularly since exFAT, again, doesn’t have hardlinks. But the primary source of hardlinks in normal usage would probably be git, which employs them to compact its structures, and I doubt it that you have >300 GB of git repositories.
Wildmimic@anarchist.nexus 7 hours ago
A second possibility is the deduplication feature of BTRFS. If you made copies of files on your SSD, they only take up space there when changing something - thats how i keep 5 differently modded Cyberpunk 2077 installations on my drive while only taking up a fraction of space that would be needed - I wouldn’t be able to copy this drive 1:1 onto a different filesystem.
SlurpingPus@lemmy.world 7 hours ago
Ah, I knew the mention of btrfs heebied my jeebies a little, but forgot about the CoW thing.
bleistift2@sopuli.xyz 7 hours ago
From the man page:
That means, if you’re transferring the file
~/foo/bar/file.txt, where~/foo/bar/is a symlink to~/foo/baz, thebazdirectory will essentially be duplicated and end up as the real directory/SSD/foo/barand/SSD/foo/baz.SlurpingPus@lemmy.world 7 hours ago
Yeah, that would do it. If OP has such symlinks, they probably need to add an exception for rsync.