Professional Web Applications Themes

Trees Synchronizing - Linux / Unix Administration

Hi folks, I search a good and _simple_ unix tools in order to synchronize 2 trees of files. Not a source code tree, just a simple tree of files. The bad solutions I have found are : 1] CVS Too complex. I don't want a repository. It seems to be only design for source code. I just want to synchronize 2 trees of files. 2] ncftpput Good but only for ftp. I want the same (ie ncftpput -u user -p password -zR websites /dir) for local stuff (without using localhost). 3] tar tar update (`-u' or `--update') is just no ...

  1. #1

    Default Trees Synchronizing

    Hi folks,

    I search a good and _simple_ unix tools in order to synchronize 2 trees
    of
    files. Not a source code tree, just a simple tree of files.

    The bad solutions I have found are :

    1] CVS
    Too complex.
    I don't want a repository.
    It seems to be only design for source code.
    I just want to synchronize 2 trees of files.

    2] ncftpput
    Good but only for ftp.
    I want the same (ie ncftpput -u user -p password -zR websites /dir)
    for local stuff (without using localhost).

    3] tar
    tar update (`-u' or `--update') is just no good.
    It's not an update, it's just a nearly all files tion, (or
    maybe an all files tion).
    Don't understand why it works the way it works.

    The good solution I have found is :

    1] Absolute Void

    So if you have a better solution, you can take 3 minutes of your time
    in order
    to respond to this post and you will have a new friend.

    Cyrille CHEVROT

    chevrot79@yahoo.fr Guest

  2. #2

    Default Re: Trees Synchronizing

    fr wrote: 

    Try rsync

    JohnK

    --
    ABSURDITY, n.
    A statement or belief manifestly inconsistent with one's own opinion.
    Ambrose Bierce, The Devil's Dictionary.
    JohnK Guest

  3. #3

    Default Re: Trees Synchronizing

    Ok, It works, thanks.

    And the magic command is :
    rsync -auv --delete SrcTree/ DestTree/

    Cyrille CHEVROT

    chevrot79@yahoo.fr Guest

  4. #4

    Default Re: Trees Synchronizing

    "fr" <fr> writes:
     

    Add -c occasionally to be completely sure that the files are exactly the
    same. And -H for proper handling of hard links.

    --
    Dragan Cvetkovic,

    To be or not to be is true. G. Boole No it isn't. L. E. J. Brouwer

    !!! Sender/From address is bogus. Use reply-to one !!!
    Dragan Guest

  5. #5

    Default Re: Trees Synchronizing

    On Sun, 12 Jun 2005 13:07:22 -0400, Dragan Cvetkovic <net> wrote: 
    >
    > Add -c occasionally to be completely sure that the files are exactly the
    > same. And -H for proper handling of hard links.[/ref]

    And note that you can use ssl as a transport rather than "r" over port
    23, if your network is set up with reasonable security.

    Dave Guest

  6. #6

    Default Re: Trees Synchronizing

    Thanks, but I don't need this options because they are two slow.

    -c, --checksum
    This forces the sender to checksum all files using a
    128-bit MD4
    checksum before transfer. The checksum is then
    explicitly
    checked on the receiver and any files of the same name
    which
    already exist and have the same checksum and size
    on the
    receiver are not transferred. This option can be quite
    slow.

    ------------------------------------------
    -H, --hard-links
    This tells rsync to recreate hard links on the remote
    system
    to be the same as the local system. Without this
    option hard
    links are treated like regular files.

    Note that rsync can only detect hard links if both parts
    of the
    link are in the list of files being sent.

    This option can be quite slow, so only use it if you need
    it.
    -----------------------------------------

    However I have added 2 new options for backup `-b' and `--backupdir',
    so the final magic command is :
    rsync -auv --delete -b --backup-dir BackupDir SrcTree DestTree

    --
    Cyrille CHEVROT

    chevrot79@yahoo.fr Guest

  7. #7

    Default Re: Trees Synchronizing

    "fr" <fr> writes:
     

    I was bitten once or twice for not using it (first time when a hard disk
    went bad and I copied as much I can salvage from it to another hard disk --
    when I did rsync it simply skipped over most of the files even though they
    were corrupt just because directory entries were intact; second time I was
    rsyncing a large DB file and after rsyncing checksums didn't match!), so I
    throw in this option once in a while (e.g. if I do rsync dayly, I add '-c'
    once a week).

     

    I had to add this one because of BitKeeper: it uses one binary and a bunch
    (some 20) of hard (!) links to it; rsync-ing it without -H option created
    these 20 files so my rsync-ed copy was much larger. I am sure they are not
    the only ones using that (e.g. all /etc/rc?.d/* scripts on Solaris are
    actually hard links to corresponding ones in /etc/init.d/*).

    This is all from my experience with rsync. Slow often means safe,
    especially if you want to backup your data. How important are your data to you?

    Bye, Dragan

    --
    Dragan Cvetkovic,

    To be or not to be is true. G. Boole No it isn't. L. E. J. Brouwer

    !!! Sender/From address is bogus. Use reply-to one !!!
    Dragan Guest

  8. #8

    Default Re: Trees Synchronizing

    > This is all from my experienc(e.g. if I do rsync dayly, I add '-c' 

    This solution seems to be a good compromise.

    --
    Cyrille CHEVROT

    chevrot79@yahoo.fr Guest

Similar Threads

  1. Forever Synchronizing
    By Eric8000 in forum Macromedia Contribute Connection Administrtion
    Replies: 0
    Last Post: May 16th, 01:12 PM
  2. synchronizing templates
    By J Long in forum Macromedia Contribute Connection Administrtion
    Replies: 1
    Last Post: March 10th, 10:27 PM
  3. Synchronizing databases
    By Ike in forum PHP Development
    Replies: 1
    Last Post: September 27th, 09:09 AM
  4. Synchronizing an avi
    By mkelley600 in forum Macromedia Director Basics
    Replies: 3
    Last Post: April 2nd, 10:16 PM

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
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139