On Sun, Aug 9, 2009 at 3:06 PM, Omry Yadan<[email protected]> wrote:
> Hi all,
> I wrote a little java program that combines Rsync and ZFS snapshots to backup 
> remote servers.
>
> configuration is really easy, check it out at 
> http://projects.firefang.net/wiki/Zync
>
> Comments are most welcomed.

I assume that the motivation for this is to have a disk-to-disk backup
of systems that don't support ZFS.  One thing that may be useful is
use of the --inplace option to rsync.  This way when files that only
partially change[1] are backed up, only the parts that are different
are written to the zfs file system.

1. e.g. that 1.5 GB access_log where the first line is in 2005 and it
is still being written to

>From rsync(1):

 --inplace
        This causes rsync not to create a new copy of the file and  then
        move  it  into place.  Instead rsync will overwrite the existing
        file, meaning that the rsync algorithm can't accomplish the full
        amount of network reduction it might be able to otherwise (since
        it does not yet try to sort data  matches).   One  exception  to
        this  is if you combine the option with --backup, since rsync is
        smart enough to use the backup file as the basis  file  for  the
        transfer.

        This  option  is  useful for transfer of large files with block-
        based changes or appended data, and also  on  systems  that  are
        disk bound, not network bound.

        The option implies --partial (since an interrupted transfer does
        not delete the  file),  but  conflicts  with  --partial-dir  and
        --delay-updates.  Prior to rsync 2.6.4 --inplace was also incom-
        patible with --compare-dest and --link-dest.

        WARNING: The file's data will be in an inconsistent state during
        the transfer (and possibly afterward if the transfer gets inter-
        rupted), so you should not use this option to update files  that
        are  in  use.   Also  note that rsync will be unable to update a
        file in-place that is not writable by the receiving user.

Since you already have a zfs snapshot of the previous state, there
would seem to be no need for --backup.  Also, the warning is not
terribly relevant for the same reason.

-- 
Mike Gerdts
http://mgerdts.blogspot.com/
_______________________________________________
sysadmin-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/sysadmin-discuss

Reply via email to