-
Notifications
You must be signed in to change notification settings - Fork 19
/
README
69 lines (58 loc) · 3.14 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
riak-data-migrator
This tool allows a user to connect to a Riak host or Riak cluster and copy
one or more buckets from Riak to a local disk and then, likewise, load one
or more buckets that have been stored to disk back into Riak.
Usage:
java -jar riak-data-migrator-0.2.4.jar [options]
Options:
-l Set to Load buckets. Cannot be used with d or k.
-d Set to Dump buckets. Cannot be used with l or k. Must specify one or more buckets
--copy Set to Copy buckets to one cluster to another. Cannot be used with d, k, l, k or delete.
-k Set to Dump bucket keys. Cannot be used with d or l. Cannot be used with t.
-t Transfer bucket properties. Will dump or load bucket properties instead of data.
Cannot be used with k.
--delete Delete bucket data. cannot be used with d, l, k, or t
-r <path> Set the path for data to be loaded to or dumped from.
The path must exist and is required.
-a Load or Dump all buckets. Cannot be used with delete
-b <bucket name> Load or Dump a single bucket.
-f <bucketNameFile.txt> Load or Dump a file containing line delimited
bucket names
-h <hostName> Specify Riak host. Required if a cluster host name file is
not specified.
-c <clusterNameFile.txt> Specify a file containing line delimited Riak
Cluster Host Names. Required if a host name is not specified.
host name is not specified.
-p <pbPortNumber> Specify Riak Protocol Buffers Port. If not specified, defaults to 8087.
-H <httpPortNumber> Specify Riak HTTP Port. If not specified, defaults to 8098.
--copyhost <hostName> Specify destination Riak host for *copy* operation
--copyhostsfile <clusterNameFile.txt> Specify a file containing Cluster Host Names. Req'd
if a single copyhost not specified.
--copypbport <pbPortNumber> Specify destination protocol buffers port, defaults to 8087.
-v Output verbose status output to the command line. Default.
-s Turn off verbose status.
-q Specify the queue size, especially if working with larger object sizes. There are
at most 2 queues for Load/Dump operations.
--riakworkercount Specify the number of workers used to read from/write
to Riak.
--maxriakconnections Specify the number of connections to maintain
in the Riak connection pool.
Examples:
Dump all buckets from Riak
java -jar riak-data-migrator-0.2.4.jar -d -r /var/riak_export -a -h 127.0.0.1 -p 8087 \
-H 8098
Load all buckets previously dumped back into Riak
java -jar riak-data-migrator-0.2.4jar -l -r /var/riak-export -a -h 127.0.0.1 -p 8087 \
-H 8098
Dump bucket settings from a bucket named "Flights":
java -jar riak-data-migrator-0.2.4.jar -d -t -r /var/riak-export -b Flights -h 127.0.0.1 \
-p 8087 -H 8098
Load bucket settings for a bucket named "Flights":
java -jar riak-data-migrator-0.2.4.jar -l -t -r /var/riak-export -b Flights -h 127.0.0.1 \
-p 8087 -H 8098
Dump buckets listed in a line delimited file from a Riak cluster
java -jar riak-data-migrator-0.2.4.jar -d -f /home/riakadmin/buckets_to_export.txt -r \
/var/riak-export -c /home/riakadmin/riak_hosts.txt -p 8087 -H 8098
Copy all buckets from one riak host to another:
java -jar riak-data-migrator-0.2.4.jar -copy -r /var/riak_export -a -h 127.0.0.1 -p 8087 \
--copyhost 192.168.1.100 --copypbport 8087