After several failures I am becoming very conservative with rsync
I decided to make 2 backups
- one on a 1Tb plugable SATA disk HDD
- one on a 32Gb usb3.0 flash drive
Here are the results
USB drive
root@trinity:/mnt/backupusb# time rsync --dry-run --quiet -axHAXS --exclude={/dev/*,/proc/*,/sys/*,/run/*,/mnt/*,/media/*,/tmp/*} / /mnt/backupusb
real 0m4.579s
user 0m2.598s
sys 0m2.247s
root@trinity:/mnt/backupusb# time rsync -axHAXS --exclude={/dev/*,/proc/*,/sys/*,/run/*,/mnt/*,/media/*,/tmp/*} / /mnt/backupusb
real 1m45.637s
user 0m13.829s
sys 0m45.104s
That seemed successful, but if I run a sync afterwards it goes forever and cant be killed.
So I rebooted and did the backup to SATA drive
SATA drive
root@trinity:/home/nevj# time rsync --dry-run --quiet -axHAXS --exclude={/dev/*,/proc/*,/sys/*,/run/*,/mnt/*,/media/*,/tmp/*} / /mnt/backupsata
real 0m4.620s
user 0m2.806s
sys 0m2.084s
root@trinity:/home/nevj# time rsync -axHAXS --exclude={/dev/*,/proc/*,/sys/*,/run/*,/mnt/*,/media/*,/tmp/*} / /mnt/backupsata
real 1m19.262s
user 0m13.495s
sys 0m46.455s
Same thing… it seems OK, but a sync never finishes.
The SATA drive is about 26 seconds faster the the USB drive.
I looked it up it says ( Google AI)
“rsync finishes followed by a sync command that takes forever, it indicates a bottleneck in flushing buffered data to the storage medium, often caused by high I/O wait, slow destination disks (HDD vs SSD), large file counts, or high-latency network storage. To fix this, optimize rsync by adding -W (whole file) to avoid slow delta calculations, -q (quiet), and ensure your sync command is only running after massive, slow write operations.”
To check, I looged at the size of the 2 backups
root@trinity:/home/nevj# du -s /mnt/backupusb
6445316 /mnt/backupusb
root@trinity:/home/nevj# du -s /mnt/backupsata
6445616 /mnt/backupsata
They are close… they will not be identical , because they were done from a running Peppermint Linux… so some files will have changed.
I then ran a diff
root@trinity:/home/nevj# diff -r /mnt/backupusb /mnt/backupsata
diff: /mnt/backupusb/bin/snap-store: No such file or directory
diff: /mnt/backupsata/bin/snap-store: No such file or directory
diff: /mnt/backupusb/bin/X11: recursive directory loop
diff: /mnt/backupusb/etc/alternatives/desktop-grub: No such file or directory
diff: /mnt/backupsata/etc/alternatives/desktop-grub: No such file or directory
diff: /mnt/backupusb/usr/bin/snap-store: No such file or directory
diff: /mnt/backupsata/usr/bin/snap-store: No such file or directory
diff: /mnt/backupusb/usr/bin/X11: recursive directory loop
That is just a sample
It eventually finished. Lots of differences in places like logfiles.
I think it is OK
Will test by doing a recovery.