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

Re: rsync -

On Fri, May 15, 2009 at 11:47 PM, Bob Goodwin <bobgoodwin wildblue net> wrote:
> Bill Davidsen wrote:
>> Bob Goodwin wrote:
>>> I have two f-10 desk top computers, boxes 6 and 9. I use them
>>> interchangeably and keep notes [notecase] in both. I would like to update
>>> each from the other without losing anything in the process.
>>> The name "rsync" seems to imply that it will make them identical. Does
>>> that mean if the source has fewer files than the target the target will have
>>> some deleted? Is there a command string to ensure I wont lose anything?
> I made backups of both files in each computer and rsync dealt with it as
> long as I transferred the entire file, something I could have done with
> sftp. If I tried to rsync the larger file with the smaller it simply
> replaced the larger file and I lost information.
> So I have the same information in both computers but there is data in the
> smaller file that I do not have in the larger one. I may have to copy the
> data individually which will probably work all right but there is no
> assurance that I will get everything.

On the possibility that it might help you here, I'm going to
restate/add to what others have already written. Apologies if you
already know this.

If you think that there is a magic tool that is going to look inside
your files that have been independently edited on separate machines
and automatically synchronise/combine/merge the files' internal
contents to make them identical without you having to think about the
process in great detail, then you are likely to be disappointed.

There are tools to assist with this for text files. The basic unix
tools are "diff" and "patch". The process of propagating changes in
one file into a second file is usually referred to as "merging" the
changes from the first file into the second. The commands 'info diff',
'man diff', 'man patch' on my Fedora 9 give a good introduction to
this which might help you to appreciate that achieving exactly the
desired result is possible but unlikely to be automatic.

This is a big issue for software development projects where many
members of a team may be simultaneously editing the same files. In
these cases, the tools used are referred to as "CVS" (Concurrent
Version System), "Subversion", "git". The commands 'info cvs', 'man
cvs' on my Fedora 9 give a good introduction to this. Again, these are
all good tools used to solve this complex problem.

The GUI tool I use that I can highly recommend to you if you want to
visually and interactively merge files' internal contents is "meld"
available as an rpm, eg 'yum install meld'.

The tool I use for sychronising files without looking into their
internal contents is "unison" that others have recommended, also
available as an rpm, eg 'yum install unison'.

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