Subject | Re: rsync - differential backup |
---|---|
Author | m2data |
Post date | 2004-06-20T12:25:21Z |
--- In firebird-support@yahoogroups.com, Jonathan Neve <jonathan@m...>
wrote:
Incremental backup only copies files from Server A to Server B
if the file dosent exist on B. If the file has changed on Server B,
then the hole file is copied again. That is like a normal sync
program.
Differential backup does the same at incremental backup, but it adds
another level. If the file on Server B has changed, it will only
transfer blocks of the file that has changed. Another thing is that
incremental backup (in some apps) results in one main backupfile and x
diff files. That means that is you loose the mainfile, the diff files
are useless. Running rsync with the -b argument, compares files A with
B and created file C. That means that you will keep yeasterdays backup
together with todays backup.
If you have 4 files F1, F2, F3, F4 containing 100K bytes each and
change 10 bytes in F3, then:
Incremental backup copies 100K over the line (F3)
Differential backup copies one block over the line. If you set the
blocksize to 8192 bytes, then 8192 bytes will be copied.
This also means that you have to choose your blocksize carefully. If
you set blocksize to 100K and all your files is less then 100K, you
will get the same as incremental backup.
:).
The algorithme could be simplyfied, because data is allocate in pages.
The page at offset 819200 with a pagesize of 8192 bytes would stay
there as long as the record is not updated/deleted. If it gets
updated, you would have to backup it up anyway. Only a full
backup/restore would break you algorithme.
If you at both ends build a MD5 checksum list you could compare the
lists and only copy when the cheksum dosen't match. Each MD5 checksum
(fingerprint) is 16 bytes long, so the blocksize should not be to
small. If your database is 1GB and 8192 bytes in blocksize/pagesize
then the list would be 2MB in size. That means that you would transfer
2MB even if file A and B is the same.
An even better idea would be to only compare some sort of
versionnumber/string in the database page header and only transfer
(with compression) when the page has changed. Maybe that is what
NBackup already is/will be doing :)
Brian Vraamark
wrote:
> What exactly is the difference between an incremental backup and aNow this is what I think it is. Someone can corret me if wrong.
> differencial backup?
Incremental backup only copies files from Server A to Server B
if the file dosent exist on B. If the file has changed on Server B,
then the hole file is copied again. That is like a normal sync
program.
Differential backup does the same at incremental backup, but it adds
another level. If the file on Server B has changed, it will only
transfer blocks of the file that has changed. Another thing is that
incremental backup (in some apps) results in one main backupfile and x
diff files. That means that is you loose the mainfile, the diff files
are useless. Running rsync with the -b argument, compares files A with
B and created file C. That means that you will keep yeasterdays backup
together with todays backup.
If you have 4 files F1, F2, F3, F4 containing 100K bytes each and
change 10 bytes in F3, then:
Incremental backup copies 100K over the line (F3)
Differential backup copies one block over the line. If you set the
blocksize to 8192 bytes, then 8192 bytes will be copied.
This also means that you have to choose your blocksize carefully. If
you set blocksize to 100K and all your files is less then 100K, you
will get the same as incremental backup.
> How is NBackup going to work?Only the developer can say, but I would like to have rsync build in
:).
The algorithme could be simplyfied, because data is allocate in pages.
The page at offset 819200 with a pagesize of 8192 bytes would stay
there as long as the record is not updated/deleted. If it gets
updated, you would have to backup it up anyway. Only a full
backup/restore would break you algorithme.
If you at both ends build a MD5 checksum list you could compare the
lists and only copy when the cheksum dosen't match. Each MD5 checksum
(fingerprint) is 16 bytes long, so the blocksize should not be to
small. If your database is 1GB and 8192 bytes in blocksize/pagesize
then the list would be 2MB in size. That means that you would transfer
2MB even if file A and B is the same.
An even better idea would be to only compare some sort of
versionnumber/string in the database page header and only transfer
(with compression) when the page has changed. Maybe that is what
NBackup already is/will be doing :)
Brian Vraamark