snaprep

git mirror of https://ccx.te2000.cz/bzr/snaprep
git clone https://ccx.te2000.cz/git/snaprep
Log | Files | Refs

commit 29e8561aaf849ff217ff37fe7ad2406e2e17e3d9
parent d0cb0c3d1ff47329425c2889cc1e1be68c31ae6d
Author: Jan Pobrislo <ccx@webprojekty.cz>
Date:   Fri, 21 Feb 2014 21:28:21 +0100

more readme
Diffstat:
MREADME.rst | 45++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 44 insertions(+), 1 deletion(-)

diff --git a/README.rst b/README.rst @@ -38,12 +38,55 @@ local destination Snapshot is saved directly in timestamped directory. Files for hardlinking are looked in snapshot with highest timestamp. -plain ssh / remote shell +remote shell destination ~~~~~~~~~~~~~~~~~~~~~~~~ Currently unimplemented. Use daemon mode instead. See USING RSYNC-DAEMON FEATURES VIA A REMOTE-SHELL CONNECTION in rsync manpage. +rsyncd destination +~~~~~~~~~~~~~~~~~~ + +Server should expose two modules: read-only ``foo`` and write-only +``foo.push``, where ``foo`` points to a snapshot sequence directory and +``foo.push`` to it's ``new`` subdirectory and has ``snap.rsync.pre`` as +pre-xfer script and ``snap.rsync.post`` as post-xfer script. + +You can use ``snap.genconf`` to generate such configuration snippet. If you +use snapshot pushing and want to make the pushing machine unable to read +snapshots back, you can use ``exclude = /[0-9]*`` in the config file to make +only the ``.snapshot.timestamp`` files readable. + +The ``foo`` module is used to determine which snapshots to push (unless you +push specific ones). Each snapshot is then in sequence written to ``foo.push`` +module. The ``.snapshot.timestamp`` file in the snapshot directory is written +last to signify that upload is complete. After that post-xfer scripts +hardlinks all files to a timestamped directory if it does not exist yet. +It's important to disable the ``--in-place`` option so existing files which +are hardlinked elsewhere are not overwritten. + +sources +~~~~~~~ + +All sources accepted by rsync are possible. It's impossible to have both +remote source and remote destination as rsync does not implement this. + +things to note +-------------- + +The rsync option ``--hard-links`` is avoided as it requires keeping whole tree +in memory, which may be infeasible in a large setup. + +Hardlinks are only kept for exact same file (path, mtime, access rights). It +is possible to make rsync search for the same file with different path using +the ``--fuzzy`` option. + +It might be reasonable to implement additional deduplication (by hardlinking +or otherwise) as rsync's algorithms are not perfect and the implementation +does not look outside single snapshot series. + +Removing old snapshots is currently left to the user. + todo ----