Find the answer to your Linux question:
Results 1 to 6 of 6
I need a program to run on Ubuntu that must be easily set up to do a series of different cloning operations at specific times between the USB drives on ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2011
    Posts
    5

    Sync local folders - not unison or rsync?


    I need a program to run on Ubuntu that must be easily set up to do a series of different cloning operations at specific times between the USB drives on a single Ubunu pc, depending on the day of the week."

    So on Monday folder B is forced to match folder A, Tuesday C forced to equal D ... and on Sunday a whole bunch of these clonings happen. This must all run unattended (at 2am) and be robust with no "what do you want to do next messages" or having the whole thing give up if there is a problem with one file. Though I do need a log of success or failure. Windows programs that do this stuff are FolderClone and GoodSync.

    I looked at Unison and Rsync and one or two others, but none appeared set up to do what I need, or to be excessively complex / general. I don't need something that can sync two copies, or over internet ....

    Any recomendations?

    Please bear in mind my linux experience is nill!

  2. #2
    Just Joined!
    Join Date
    Apr 2011
    Posts
    14
    I don't know why rsync would not be sufficient for this job. Rsync will go faster on subsequent backups because it only copies differences over.

    Code:
    rsync -avz /home/youruser/backmeup/ /backup
    Remove the z to not use compression. Remove the v to not be verbose. I recommend keeping the -a, though.

    If you want to simply copy everything over then you can do:

    Code:
    cp -r  /home/youruser/backmeup/ /backup
    If rsync or cp are not good enough, please let us know what features you are looking for.

  3. #3
    Just Joined!
    Join Date
    Apr 2011
    Posts
    14
    I forgot to mention. Type "crontab -e" and add this line to make a backup every Sunday at 2am:

    Code:
    0 2 * * 0 rsync -avz /home/youruser/backmeup/ /backup

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Apr 2011
    Posts
    5
    OK, thanks. Given your recomendation I have pulled up more sources describing rsysnc, and I think we are moving into more detailed terratory now. Incidentally I am trying to replicate in linux the system that has been running under windows for years, so the desination folders are already clones, and only the differences need acounting for. So I want to be fairly sure I have got things right before going live.

    1. One source I looked at (I can't publish urls but if you think the usual prefix dot mikerubel dot org slash computers slash rsync_snapshots slash you would get there) - indicates that under some circumstances the result of an rsync run is not a physical clone of the source files in the destination but just links to real files. This is not what I want but I am not clear how to avoid it.
    2. I also want to be sure that I am getting true cloning, not incremental or delta backups. Is this something that could happen if I do not take steps to avaoid it?
    3. I believe I need to use the --delete and -a directives to acieve true cloning, i.e. the destination is, after the rsync, exactly the same as the source.
    4. Having been used to drive letters for so long, I want to be sure that I am referencing the drives correctly. On the linux desktop I see two icons, and under them I see "OneTerra" and "1 Terra-Seagate" (note the space). So I assume my rsync commands would look like:
    rsync -a --delete OneTerra/BU/ 1 Terra-Seagate/DataBUWed
    and after the run the contents of folder DataBUWed on drive "1 Terra-Seagate" would be exactly the same as folder BU on drive "OneTerra", and folder BU would be unchanged. Right?

  6. #5
    Just Joined!
    Join Date
    Apr 2011
    Posts
    14
    1. Rsync is used in production environments of many companies. I've never experienced this problem, but maybe another user can inform us.

    2. Rsync doesn't backup deltas, it uses deltas to backup. For example, if only 5 characters change in a file, it will copy those 5 bytes to the destination file and modifies it. This is a more efficient method of backing up. You can verify the integrity of a file with md5sum. Compare hashes if you want to test it for yourself.

    3. Yes, true cloning would require --delete to remove files from the destination directory. Just use it --delete with caution.

    4. The paths you list are relative to the current working directory. When running it from cron you will need to specify the full path. In Ubuntu, all devices are mounted to /mnt or /media. So, the full path would be /mnt/OneTerra/BU/ as an example.

  7. #6
    Just Joined!
    Join Date
    Apr 2011
    Posts
    5
    1. The source I referenced did not put this forward as a bug, rather a feature that saved space by substituting a link for a file.
    2. Similarly, whilst the source noted the same feature you do, i.e. reduced copying, it also apeared to me to indicate that incremental BU's could be done. Maybe I misread the article on points 1 and 2.
    3. Very good - thanks for the confirmation and warning.
    4. Yes OK thanks, I got that - also I believe my other drive name needs to be enclosed in single quotes since it has a space in it.

    Thanks for the help!

Posting Permissions

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