add mog-sync example script
commit2b8c6b1ed67f3b33eeea3ba2121d9c6fa0ec57f0
authorEric Wong <normalperson@yhbt.net>
Wed, 22 Oct 2014 06:08:07 +0000 (22 06:08 +0000)
committerEric Wong <normalperson@yhbt.net>
Wed, 22 Oct 2014 06:08:07 +0000 (22 06:08 +0000)
tree32c4a33d55bc012bf6d6afb0d4b7327a030ac431
parent5ef37bdc900b9d06d450cbbc5f5bece4b561bb42
add mog-sync example script

This allows verbatim copying between two domains on different
(or the same) MogileFS instance.

It is idempotent and may be used like "rsync -a" for periodic
syncing.

It is also multi-threaded with configurable concurrency for
metadata vs file transfer checks.

Usage: mog-sync.rb SRC_TRACKER_LIST/SRC_DOMAIN DST_TRACKER_LIST/DST_DOMAIN

    -j, --metadata-jobs JOBS         Number of metadata jobs to run in parallel
    -J, --copy-jobs JOBS             Number of copy jobs to run in parallel
    -h, --help                       Show this help message.
        --get-file-data-timeout SECONDS
        --new-file-max-time SECONDS
        --fail-timeout SECONDS
        --timeout SECONDS
    -v, --verbose
    -d, --delete
    -n, --dry-run
    -p, --prefix STRING
        --src-class STRING
        --dst-class STRING
        --after STRING
        --max-size STRING
    -F, --clobber-missing-checksum
examples/mog-sync.rb [new file with mode: 0644]