I am running rsync version 3.0.8
and cp 8.32
on a Windows 10 host via git-bash
. I have a git server running in a container that uses a hard drive attached to the host. Now I try to backup that server files and keep failing no matter if I use rsync
or cp
.
I could narrow it down to a file that does exist on the hard drive but when transferring it is created as an empty file on the backup drive.
Here is what I try:
$ cd /backup_drive && \
> rsync \
> --verbose \
> --checksum \
> --archive \
> --delete \
> --progress \
> "../server_drive/git-server/repo/objects/pack" \
> "../backup_drive/server_drive/git-server/repo/objects"
sending incremental file list
pack/
pack/pack-558bb0397370ee5026dd0ce32579908064ed9e72.pack
-24729119 100% 0.00kB/s 0:00:00 (xfer#1, to-check=2/5)
sent 319 bytes received 41 bytes 48.00 bytes/sec
total size is 5794386858 speedup is 16095519.05
(cd is used as there are issues with colons that git-bash
will automatically add).
or
cp \
--force \
--recursive \
--verbose \
--update \
"/server_drive/git-server/repo/objects/pack" \
"/backup_drive/server_drive/git-server/repo/objects"
Both commands exit with 0
indicating that there were no errors. But when I compare the SHA-256 hashes they are obviously different because of the missing bytes in that file.
Interestingly, if I copy the file on Windows by hand it works just fine.
What could that be caused of and how can I backup that file via rsync
or cp
?