[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Offline sync rool a la rsync ?

On Wed, 17 Jan 2001, Gregor Hoffleit wrote:

> I'm looking for a tool like rsync that's able to work in offline mode.
> Imagine a machine has no internet connection, but keeps a repository of
> files. At another machine, there's a second instance of that repository. Now
> I'd like to be able to use e.g. a zip disk to carry the changes from one
> site to the other and back.
> In the simplest case, I could keep a filelist of both repositories on the
> zip disk, and every time a file is in the local repository, but not in the
> other, it would be copied to the disk. More elaborate versions of the
> algorithm could involve checksums and/or date checks.
> Does something like this already exist ?
I try to solve this problem (transportation of files via zip disk and
syncing my laptop) by a perl script written by myself.  It is not really
in a state to be called ready for the public and I'm not sure if it ever
will but my be it's interesting for you.

It works not like rsync.  It is slower as rsync.  So why not using rsync
(or unison which as quite the same problem which bothered me)?
I like to have all my repositories in a form that the MidnightCommander
shows no differences between the files after a filecompare.  Mc checks
for file size and file date.  Unfortunately rsync and unison check for
file contents (well, it's OK but it is not what I like!).  Both programs
seem to ignore file dates.

My script works this way:
  - parse a list of directories and files which to check (and which
    to ignore when you want to sync a whole directory tree but some
    files should be left out)
  - exclude a list of extensions (well, why should I synx *.o, *~, ...)
  - search both repositories if the files have same size and date
  - if not ask the user if the newer file should be copied
    (you can switch of this question and let it work automatically but
    the script is in the state that I don't switch the question of)
  - if there are missing directories they were created
  - there are problems with symlinks because I didn't found out how
    to create a symlink with the same date (cp -a is used for files and
    symlinks but this changes the date of a symlink :-( - touch doesn't
    help because it changes the file date the link points to)
    So I check the contents of the links using readlink()

I have a todo list what is planned but I'm not sure who fast I can step
down the list.  If someone is interested I would write some kind of
documentation and may be we could build a team to make this thing a bit more
Currently it is 
    grep -v -c "^#" zap
lines of perl code, written by a not very skilled Perl programmer (to be true
I would consider me more or less as Perl beginner).

Kind regards

lines of perl code, written by a not very skilled Perl programmer (to be true
I would consider me more or less as Perl beginner).

Kind regards


Reply to: