Last change
on this file since 31305 was 31305, checked in by davidb, 7 years ago |
Next good commit point. Initial testing of shard replset scripts
|
-
Property svn:executable
set to
*
|
File size:
737 bytes
|
Rev | Line | |
---|
[31302] | 1 | #!/bin/bash
|
---|
| 2 |
|
---|
| 3 | unique_hosts=`echo $MONGODB_CONFIG_HOSTS $MONGODB_ROUTER_HOSTS $MONGODB_SHARD_HOSTS | tr ' ' '\n' | sed 's/:.*$//' | sort | uniq`
|
---|
| 4 |
|
---|
| 5 | #local_dir="/tmp/mongodb"
|
---|
| 6 | local_dir="/hdfsd05/dbbridge/gslis-cluster/mongodb"
|
---|
| 7 | local_dbdir="/hdfsd05/dbbridge/mongodb-databases"
|
---|
| 8 |
|
---|
| 9 | for mongodb_host in $unique_hosts ; do
|
---|
| 10 | remote_dir="$mongodb_host:$local_dir"
|
---|
| 11 |
|
---|
| 12 | echo "Running rsync from networked MONGODB_HOME to $remote_dir"
|
---|
| 13 | ssh $mongodb_host "if [ ! -d $local_dir ] ; then mkdir $local_dir ; fi"
|
---|
| 14 | rsync -pav "$MONGODB_HOME/." "$remote_dir/."
|
---|
| 15 |
|
---|
| 16 | ssh $mongodb_host "if [ ! -d $local_dbdir ] ; then mkdir $local_dbdir ; fi"
|
---|
[31305] | 17 | ## ssh $mongodb_host "if [ ! -d $local_dbdir/config-metadata ] ; then mkdir $local_dbdir/config-metadata ; fi"
|
---|
[31302] | 18 |
|
---|
| 19 | done
|
---|
Note:
See
TracBrowser
for help on using the repository browser.