Deltacopy


What is Deltacopy?
---------------------------------------


On event you have to backup one file that is 500 MB every night. A normal file copy would copy the entire file even if a few bytes have changed. DeltaCopy, on the other
hand, would only copy the part of file that has actually been modified.
Advantage of using 'deltacopy' is your destinationmachine's disk lifespan get extended since you are just writing new changes only.

####################################################################################


Non-internet
=========================



Current machine
Transfer vm to another directory within own workcomputer
unix-2024.02.29-x86_64.vm (1.3G);
---------------------------------------------------------------------------------------------------------


-----------
Rsync
-----------

# Clear kernel cache to ensure more accurate test
$ sync; sudo sh -c "echo 3 > /proc/sys/vm/drop_caches"



# sync the new modified vdi file

#dest machine updated with newer rsync ( rsync 3.2.7 )
$ time rsync -avz --progress "/path/tmp/unix_b/unix-2024.02.29-x86_64.vm" "/residence/backup2/"
sending incremental file list
unix-2024.02.29-x86_64.vm
1,368,387,584 100% 313.32MB/s 0:00:04 (xfr#1, to-chk=0/1)

sent 1,345,267,581 bytes received 35 bytes 298,948,359.11 bytes/sec
total size is 1,368,387,584 speedup is 1.02

real 0m4.267s
user 0m1.923s
sys 0m1.609s


Conclusion:
---------------
Rsync doesn't seem 'delta-transfer' feature for localfiles. It went to 're-copy' entire image.
It went to sent 1,652,018,702 bytes again.



---------------------------------------------------------------------------------------------------------


---------------
VRangesync
--------------

# Clear kernel cache to ensure more accurate test
$ sync; sudo sh -c "echo 3 > /proc/sys/vm/drop_caches"




# -dc "10M" mean it split file into chunk (10M in size)
# sync the new modified vdi file
# data compression algorithm usng 'zstd'(default)
$ time ./vr -i "/path/tmp/unix_b/unix-2024.02.29-x86_64.vm" -o "/residence/backup2/" -dc "10M"

start - deltacopy calculation of checksum
[WARNING]
! It will take an extensive period of time to calculate checksum if it is a very huge file.
! "end - deltacopy calculation of checksum" will be announce once calculation of checksum is completed.

22 Dec 2025 11:09:56 [Src] 18d5de2b4864ff02 unix-2024.02.29-x86_64.vm_1
22 Dec 2025 11:09:56 [Dst] 3b9c2ebcd5c3dff1 unix-2024.02.29-x86_64.vm_0
22 Dec 2025 11:09:57 [Src] 1877e23a6b56f624 unix-2024.02.29-x86_64.vm_2
22 Dec 2025 11:09:57 [Dst] 1877e23a6b56f624 unix-2024.02.29-x86_64.vm_2
22 Dec 2025 11:09:58 [Src] 1b57c75da6dfbba3 unix-2024.02.29-x86_64.vm_4
22 Dec 2025 11:09:58 [Dst] 1b57c75da6dfbba3 unix-2024.02.29-x86_64.vm_4
22 Dec 2025 11:09:59 [Src] 39f529b64e81ff2e unix-2024.02.29-x86_64.vm_6
22 Dec 2025 11:09:59 [Dst] 39f529b64e81ff2e unix-2024.02.29-x86_64.vm_6
22 Dec 2025 11:10:00 [Src] e23fd9cb62e9fcb3 unix-2024.02.29-x86_64.vm_8
22 Dec 2025 11:10:00 [Dst] e23fd9cb62e9fcb3 unix-2024.02.29-x86_64.vm_8
22 Dec 2025 11:10:01 [Src] 182ca3229ed7d21c unix-2024.02.29-x86_64.vm_10
22 Dec 2025 11:10:01 [Dst] 182ca3229ed7d21c unix-2024.02.29-x86_64.vm_10
22 Dec 2025 11:10:02 [Src] 60ac7d084926e683 unix-2024.02.29-x86_64.vm_12
22 Dec 2025 11:10:02 [Dst] 60ac7d084926e683 unix-2024.02.29-x86_64.vm_12
22 Dec 2025 11:10:03 [Src] acbe3eea8e0262cf unix-2024.02.29-x86_64.vm_14
22 Dec 2025 11:10:03 [Dst] 54599847212be9f4 unix-2024.02.29-x86_64.vm_13
22 Dec 2025 11:10:04 [Src] 5735f47195e92afe unix-2024.02.29-x86_64.vm_16
22 Dec 2025 11:10:04 [Dst] 51b1d11be2837e11 unix-2024.02.29-x86_64.vm_15
22 Dec 2025 11:10:05 [Src] b16da1552545c9d1 unix-2024.02.29-x86_64.vm_18
22 Dec 2025 11:10:05 [Dst] fec749eb2265a89f unix-2024.02.29-x86_64.vm_17
end - deltacopy calculation of checksum
10+1 records in
10+1 records out
68419379 bytes (68 MB, 65 MiB) copied, 0.153136 s, 447 MB/s


real 0m11.471s
user 0m0.101s
sys 0m0.120s




Conclusion:
--------------

On new changes:
Vrangesync - 0m11.471s & copy 66MB new changes
Rsync - no deltacopy available if involve localfiles

VRangesync identify 66MB new changes and sync the new changes
It save bandwidth and reduce write on destinationmachine's disk. Your destinationmachine's disk lifespan get extended as a result.

On enterprise datacenter, data administrator deal with terabytes vm images. Saving bandwidth and disk will matter alot in real world scenario.
==================================================================================



####################################################################################

Internet
=========================

------------------------------------------------------------------------------------
---------------
rsync ---------------
currentworkcomputer: rsync 3.2.7
dest machine: rsync 3.2.7

# sync the new modified vdi file

#dest machine updated with newer rsync ( rsync 3.2.7 )
$ time rsync -avz --progress "/path/tmp/unix_b/unix-2024.02.29-x86_64.vm" -e "ssh -p22" root@1.2.3.4:/destination/backup/

sending incremental file list
unix-2024.02.29-x86_64.vm
1,368,387,584 100% 416.78MB/s 0:00:03 (xfr#1, to-chk=0/1)

sent 1,998 bytes received 259,047 bytes 14,916.86 bytes/sec
total size is 1,368,387,584 speedup is 5,241.96

real 0m17.165s
user 0m0.752s
sys 0m0.350s


------------------------------------------------------------------------------------


---------------
Vrangesync(ssh)
---------------

'currentmachine-to-remotemachine'


# -dc "10M" mean it split file into chunk (10M in size)
# sync the new modified vdi file
# data compression algorithm usng 'zstd'(default)
$ time ./vr -i "/path/tmp/unix_b/unix-2024.02.29-x86_64.vm" -o "/destination/backup" -da "root@1.2.3.4" -dp "22" -df "pw.txt" -dc "10M"



start - deltacopy calculation of checksum
[WARNING]
! It will take an extensive period of time to calculate checksum if it is a very huge file.
! "end - deltacopy calculation of checksum" will be announce once calculation of checksum is completed.

22 Dec 2025 13:07:37 [Src] 6d7156007cbf9d49 unix-2024.02.29-x86_64.vm_5
22 Dec 2025 13:07:37 [Dst] 0e500cf90625ea1c unix-2024.02.29-x86_64.vm_3
22 Dec 2025 13:07:38 [Src] 54599847212be9f4 unix-2024.02.29-x86_64.vm_13
22 Dec 2025 13:07:38 [Dst] 8395825b5535ac9c unix-2024.02.29-x86_64.vm_7
22 Dec 2025 13:07:40 [Src] 3aefa6fd5cf2deb4 unix-2024.02.29-x86_64.vm_20
22 Dec 2025 13:07:40 [Dst] 2457af2a2d05a0f6 unix-2024.02.29-x86_64.vm_9
22 Dec 2025 13:07:41 [Dst] acbe3eea8e0262cf unix-2024.02.29-x86_64.vm_14
end - deltacopy calculation of checksum
10+1 records in
10+1 records out
68419379 bytes (68 MB, 65 MiB) copied, 0.311648 s, 220 MB/s
0+512 records in
0+512 records out
68419379 bytes (68 MB, 65 MiB) copied, 0.369172 s, 185 MB/s


real 0m7.167s
user 0m0.206s
sys 0m0.262s


vrangesync found 66M new changes and sync to destination machine




---------------
Vrangesync 'ncat'
---------------
no deltacopy available for 'ncat' since using 'ssh' for deltacopy is very efficient & fast enough



Conclusion:
--------------

Vrangesync(ssh) - 0m7.167s
Rsync - 0m17.165s


VRangesync identify 66MB new changes and sync the new changes
It save bandwidth and reduce write on destinationmachine's disk. Your destinationmachine's disk lifespan get extended as a result.

On enterprise datacenter, data administrator deal with terabytes vm images. Saving bandwidth and disk will matter alot in real world scenario.

========================================================================================================================

[NOTE]
---------------

Deltacopy is available for following Vrangesync(ssh)
-'currentmachine's_disk-to-currentmachine's_disk2'
-'currentmachine-to-remotemachine'
-'remotemachine-to-currentmachine'
-'remote-to-remotemachine'

Vrangesync do the calculation in-memory and not affect the disk performance.



On using 'rsync' for deltacopy,
your destinationmachine need to have sufficient space
You will get 'No space for device' error if you do not have sufficient diskspace on destination machine. For example, your / root partition only have 769mb availablespace
and while you are trying to delta-copy a 1.3GB file. Rsync need space to split,dump and calculate file for delta-copy.


#################################################################################




Visit vrangesync today!



Free system sync,clone,mover tool


Individual, student and startup that like to keep cost within your budget, feel free to get our free version of the Free system sync,clone,mover tool at - Free system sync,clone,mover tool.