Berkeley CSUA MOTD:2009:August:21 Friday <Thursday>
Berkeley CSUA MOTD
2009/8/21-9/1 [Computer/SW/Unix] UID:53297 Activity:nil
8/20    When I use rsync to backup, it's pretty cool except in cases where
        I rename a directory name from the source. Rsync will just do
        a plain copy. Is there a program that'll detect renaming of
        directories (by checking for children files), or at least
        move them to a dated directory?
        \_ Not related but beware of using rsync as a backup tool.
           Consider using something like rsnapshots instead.
           \_ what's wrong with rsync?
              \_ Same reason why RAID is not a backup. If, out of
                 user error, you delete a file then it's gone in
                 both the original and the backup. Combine
                 rsnapshots with rsync and you'll have a better
                 backup solution. This way, you'll retain some
                 history so you can recover files later on.
                 \_ rsync has a --backup option to move unsync'ed
                    files into a backup directory. Did you miss that?
        \_ try this:
           % sync --backup-dir=._090821 --suffix='' --delete -avrb \
                --filter='merge /Users/username/.rsync-filter' \
                src dest
           My rule in .rsync-filter excludes ._* names.
           This will move files into ._090821 so that dest==src
        \_ Huh? Use --delete to make an exact replica on the destination.
           \_ --delete will delete files that you may need later on, that's
              the point of a backup. Make sure to use --backup in
              conjunction with --delete.
Berkeley CSUA MOTD:2009:August:21 Friday <Thursday>