Thursday 11 December 2008

Careful with rsync!

After losing a lot of data, here the Golden Rule with rsync.

  • Never use
    --delete
    unless you really need it;

  • if viable, check what are you going to do with
    -av --dry-run
    (it doens't take so long, also if a lot of data is to be moved);

  • it's better to create target directory manually instead of having rsync doing the job:

    target$ mkdir -p target_dir
    source$ rsync -av source_dir/ target:/target_dir


That's all, have fun with rsync.

No comments: