Results 1 to 2 of 2

Thread: A Question about bidirectional synchronization

  1. #1
    Join Date
    Sep 2007
    Location
    Vienna
    Beans
    234

    Question A Question about bidirectional synchronization

    Hi,

    i have a question concerning file/folder synchronization. Currently, i use rsync via ssh to backup my personal data to my old laptop:

    Code:
    rsync -ahv --delete -e ssh /media/data/andreas andreas@oldlaptop:/media/data/andreas
    this obviously goes one way, new laptop --> old laptop. now i thought i'd make it work both ways, so i can edit/create documents on the old laptop too. some googling tells me that unison is what i want to use, but before i can do so, i want to understand something:

    if a certain file is different in the two places, i assume the one with the newer timestamp overwrites the older one. but: what happens if a certain file only exists in one place? how can unison (or any other tool, for that matter) determine whether the file was newly created in place A (and copy it to place B), or recently deleted in place B (and thus delete it from place A)?
    As you can see from my history, i was once an enthusiastic ubuntu user. I would hereby like to assert that i no longer recommend using ubuntu to anyone. I recommend using one of the many distributions that do not include ad-/spyware by default.

  2. #2
    Join Date
    Feb 2005
    Location
    Melbourne, Australia
    Beans
    13,510
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: A Question about bidirectional synchronization

    Quote Originally Posted by Andreas1 View Post
    ........
    if a certain file is different in the two places, i assume the one with the newer timestamp overwrites the older one. but: what happens if a certain file only exists in one place? how can unison (or any other tool, for that matter) determine whether the file was newly created in place A (and copy it to place B), or recently deleted in place B (and thus delete it from place A)?
    When you first use Unison it creates a database with all the files you originally copy, so if a file then is removed from either location it deletes the other copy as well.
    Regards, David.
    Please use the Forum search and Wiki search for immediate help
    Please mark your thread as Solved when appropriate
    New to technical forums?: How To Ask Questions The Smart Way

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •