bum_rdiff | index ../bum_rdiff.py |
Rdiff-backup based backup method
This module defines all methods required to successfully backup a file using the
rdiff-backup method.
Expected roadmap:
* The method works this way:
* get the signature for a given file that has been modified (of course
the original unmodified version should be in the target directory)
using the SigFile method.
* Apply the modified file signature to the original file to obtain a
diff version using the DeltaFile method and store the diff file.
* Whenever we want to get the original file backup, apply the diff to
modified version: this will return the original version.
* This method always keep the last version of the file and stores the
deltas of previous versions so that users can restore the prior
incarnations of the file whenever they want.
* To make this method fit our established plan, we need to take in
consideration the defined transport for the task: if the target directory
is local, we can do the work without transfering information. In case the
target is in a remote device or placed in a mounted device we need to
transfer as little information as posible.
* A suggested plan could be the following:
* if local transport:
* perform the DeltaFile with two file-like objects locally.
* save the diff file before replacing the original file with the
modified one: we will have the last version and then all deltas
that can be use to patch this last version in reverse until user
gets the version she/he wants.
* if remote transport:
* with every last version of a file, we store its signature (of
course, we're talking about the remote target), compressed.
* If the file in the local side changed, we connect and request
signature.
* Server sends it and we decompressed it.
* Apply this signature to the modified local version and get a
Delta File.
* Compress the Delta, send it to the remote server and discard the
received signature.
* Patch the server version with the Delta File (all described until
now is according to Martin Pool's paper "rdiff 1.0pre DRAFT, 20th
July 2004") and generate the SigFile and compress it (this
compressed sigfile will be needed the next time to backup),
saving a temporal copy of the original version.
* Apply DeltaFile to the temporal copy of the original file and the
signature of our new modified version.
* Get a diff we can now store as an incremental reverse version.
* Discard the temporal original version.
For more on rdiff-backup please see: http://www.nongnu.org/rdiff-backup/
For more on librsync / rdiff please see: http://librsync.sourcefrog.net/
Modules | ||||||
|
Classes | ||||||||
|
Functions | ||
|