Skip to content

Instantly share code, notes, and snippets.

@cdimartino
Created June 4, 2013 18:18
Show Gist options
  • Save cdimartino/5708204 to your computer and use it in GitHub Desktop.
Save cdimartino/5708204 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Usage: curl -L gist.... | host=<sync origin> date=<sync date>
apt-get install -y pv
excludes='--exclude "*/SubscriptionChanges/*"'
rs_opts="-ai $excludes $host:/mnt/cassandra_snapshots/full/$date/place_directory_production /var/lib/cassandra/data/"
rsync $rs_opts | pv -arleps `rsync --dry-run $rs_opts | wc -l` > /dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment