Incremental backup with only delta into a separate file.

Manikanta Kattamuri mani.kattamuri at hexagrid.com
Mon Feb 7 06:31:39 MST 2011


Hi All,

I am presently doing a small POC with rsync for incremental backup and
restore starategies.

I have come up with certain question down the line, can anyone help me with
the explanation.

Used the config and ideas from:
http://www.mikerubel.org/computers/rsync_snapshots/


The commands executed on two machines in sequence

Machine 1:
root at Andruil:~# vim testfile
root at Andruil:~# ls -lh testfile
-rw-r--r-- 1 root root 71 2011-02-07 17:10 testfile
root at Andruil:~# rsync -avh testfile vxadmin at 192.168.155.151:/tmp --stats
--progress
vxadmin at 192.168.155.151's password:
sending incremental file list
testfile
          71 100%    0.00kB/s    0:00:00 (xfer#1, to-check=0/1)
sent 147 bytes  received 31 bytes  20.94 bytes/sec
total size is 71  speedup is 0.40

Machine 2:
vxadmin at vx64:/tmp$ ls -lh testfile
-rw-r--r-- 1 vxadmin vxadmin 71 2011-02-07 17:10 testfile
vxadmin at vx64:/tmp$ cp -al testfile testfile_bak1
vxadmin at vx64:/tmp$ ls -ilh testfile*
140822 -rw-r--r-- 1 vxadmin vxadmin  71 2011-02-07 17:33 testfile
140822 -rw-r--r-- 1 vxadmin vxadmin  71 2011-02-07 17:10 testfile_bak1

Machine 1:
root at Andruil:~# vim testfile
root at Andruil:~# ls -lh testfile
-rw-r--r-- 1 root root 159 2011-02-07 17:33 testfile
root at Andruil:~# rsync -avh testfile vxadmin at 192.168.155.151:/tmp --stats
--progress
vxadmin at 192.168.155.151's password:
sending incremental file list
testfile
         159 100%    0.00kB/s    0:00:00 (xfer#1, to-check=0/1)
sent 168 bytes  received 37 bytes  45.56 bytes/sec
total size is 159  speedup is 0.78
vxadmin at vx64:/tmp$ ls -ilh testfile*
140822 -rw-r--r-- 1 vxadmin vxadmin 159 2011-02-07 17:33 testfile
140823 -rw-r--r-- 1 vxadmin vxadmin  71 2011-02-07 17:10 testfile_bak1


As from this output i came to understand that when new update is written to
the backup, the first backup file hardlink is destroyed and a new file is
created.
Is it how this works or am i missing anything here. I have performed these
operations with large qcow2 images also.

I came to a conclusion that this incremental concept is good, taking into
consideration that only the delta is transferred.

Is there anyway in which i can have only the delta of the original file be
present at the backup location.
something like
1. 1st backup is 100M
2. write 20MB to the original file
3. do a sync using hardlinks
4. i have 20MB file at backup location with the delta changes only.


Mani


-- 
K Manikanta Swamy
+919059014442
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.samba.org/pipermail/rsync/attachments/20110207/10e0c6f9/attachment.html>


More information about the rsync mailing list