Backupt to network share (cifs) issues
by tk3000 from LinuxQuestions.org on (#6HN41)
Hello Folks,
I am facing some odd and maybe abnormal situation while backup files and directories from ext4 partitions to a smb/cifs network share whose partition is formated with ntfs.
Using rsync:
rsync -rvzhLKH --atimes *--times --exclude={'.cache','.Cache'} /opt/ /mnt/smb/USB_128GB_BACKUP/HP-ProBook_LinuxBox/opt/
=> some times the command preserve the timestamp, more often than not it does not preserve them -i same type of filesystems (ext4 => ntfs/cifs share)
It seems to copy everything (no incremental backup though, it is everything) and at the end it outputs the following:
sent 21.92G bytes *received 1.14M bytes *19.61M bytes/sec
total size is 23.51G *speedup is 1.07
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1336) [sender=3.2
.7]
Upon issue the command idu -BM -ci, at the end, the command outputs about 82GB which non-sense given that /opt only has about 23GB.
On the other hand if I used the following command:
ls -lR | awk '{ sum += $5 } END{ print sum } ' | awk '{print $1 / (1000*1000*1000) *}'
it outputs the right/expected amount: about 23GB.
So, the quandaries: 1) sometimes preserve and other times it does not preserve timestamps; 2) completely out of the wacky output from idui for the cifs share; 3) no incremental backup (it always copies everything over and over); 4) the warning at the end, irsync error: some files/attrs were not transferred (see previous errors) (code 23) i at first does not add up since I did not request to have permissions transferred with the command issued, no --perms or -p parameter (likely it would not work with dissimilar filesystems)
Note: the system used is Slackware64 current.
Note: "rsync --version" return the following:
rsync version 3.2.7 protocol version 31
Copyright (C) 1996-2022 by Andrew Tridgell, Wayne Davison, and others.
Thanks!
I am facing some odd and maybe abnormal situation while backup files and directories from ext4 partitions to a smb/cifs network share whose partition is formated with ntfs.
Using rsync:
rsync -rvzhLKH --atimes *--times --exclude={'.cache','.Cache'} /opt/ /mnt/smb/USB_128GB_BACKUP/HP-ProBook_LinuxBox/opt/
=> some times the command preserve the timestamp, more often than not it does not preserve them -i same type of filesystems (ext4 => ntfs/cifs share)
It seems to copy everything (no incremental backup though, it is everything) and at the end it outputs the following:
sent 21.92G bytes *received 1.14M bytes *19.61M bytes/sec
total size is 23.51G *speedup is 1.07
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1336) [sender=3.2
.7]
Upon issue the command idu -BM -ci, at the end, the command outputs about 82GB which non-sense given that /opt only has about 23GB.
On the other hand if I used the following command:
ls -lR | awk '{ sum += $5 } END{ print sum } ' | awk '{print $1 / (1000*1000*1000) *}'
it outputs the right/expected amount: about 23GB.
So, the quandaries: 1) sometimes preserve and other times it does not preserve timestamps; 2) completely out of the wacky output from idui for the cifs share; 3) no incremental backup (it always copies everything over and over); 4) the warning at the end, irsync error: some files/attrs were not transferred (see previous errors) (code 23) i at first does not add up since I did not request to have permissions transferred with the command issued, no --perms or -p parameter (likely it would not work with dissimilar filesystems)
Note: the system used is Slackware64 current.
Note: "rsync --version" return the following:
rsync version 3.2.7 protocol version 31
Copyright (C) 1996-2022 by Andrew Tridgell, Wayne Davison, and others.
Thanks!