You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by John Wong <go...@gmail.com> on 2015/11/09 06:11:31 UTC

Best way to recreate a cassandra node with data

Hi.
We are running Cassandra 1.2.19, and we are AWS customer, so we store our
data in ephemeral storage.

If we recreate an instance with the same IP, what is the best way to get
the node up and running with the previous data? Right now I am relying on
backup.

I was hoping that we can stream the data, but nodetool rebuild is for
bringing up a new data center. I just re-created the instance and I don't
see much going on except keyspaces are being re-created with some data
file. I thought Cassandra would automatically stream data from replicas...

Ideas?
Thanks.

John

Re: Best way to recreate a cassandra node with data

Posted by Eric Stevens <mi...@gmail.com>.
Check nodetool status to see if the replacement node is fully joined (UN
status).  If it is and it didn't stream any data, then either
auto_bootstrap was false, or the node was in its own seeds list.  If you
lost a node, then replace_address as Jonny mentioned would probably be a
good idea.

On Mon, Nov 9, 2015 at 1:31 AM Johnny Miller <jo...@gmail.com>
wrote:

> John - Why not just just follow the process for replacing a dead node? Why
> do you need to use the same IP? e.g. JVM_OPTS="$JVM_OPTS
> -Dcassandra.replace_address=address_of_dead_node
>
>
> http://docs.datastax.com/en/cassandra/1.2/cassandra/operations/ops_replace_node_t.html
>
>
> Johnny
>
>
> On 9 Nov 2015, at 05:11, John Wong <go...@gmail.com> wrote:
>
> Hi.
> We are running Cassandra 1.2.19, and we are AWS customer, so we store our
> data in ephemeral storage.
>
> If we recreate an instance with the same IP, what is the best way to get
> the node up and running with the previous data? Right now I am relying on
> backup.
>
> I was hoping that we can stream the data, but nodetool rebuild is for
> bringing up a new data center. I just re-created the instance and I don't
> see much going on except keyspaces are being re-created with some data
> file. I thought Cassandra would automatically stream data from replicas...
>
> Ideas?
> Thanks.
>
> John
>
>
>

Re: Best way to recreate a cassandra node with data

Posted by Johnny Miller <jo...@gmail.com>.
John - Why not just just follow the process for replacing a dead node? Why do you need to use the same IP? e.g. JVM_OPTS="$JVM_OPTS -Dcassandra.replace_address=address_of_dead_node

http://docs.datastax.com/en/cassandra/1.2/cassandra/operations/ops_replace_node_t.html <http://docs.datastax.com/en/cassandra/1.2/cassandra/operations/ops_replace_node_t.html>


Johnny


> On 9 Nov 2015, at 05:11, John Wong <go...@gmail.com> wrote:
> 
> Hi.
> We are running Cassandra 1.2.19, and we are AWS customer, so we store our data in ephemeral storage.
> 
> If we recreate an instance with the same IP, what is the best way to get the node up and running with the previous data? Right now I am relying on backup.
> 
> I was hoping that we can stream the data, but nodetool rebuild is for bringing up a new data center. I just re-created the instance and I don't see much going on except keyspaces are being re-created with some data file. I thought Cassandra would automatically stream data from replicas...
> 
> Ideas?
> Thanks.
> 
> John


Re: Best way to recreate a cassandra node with data

Posted by Robert Coli <rc...@eventbrite.com>.
On Sun, Nov 8, 2015 at 9:11 PM, John Wong <go...@gmail.com> wrote:

> If we recreate an instance with the same IP, what is the best way to get
> the node up and running with the previous data? Right now I am relying on
> backup.
>

replace_address if you don't mind decreasing unique replica count by one.

https://github.com/JeremyGrosser/tablesnap

If you do care about decreasing unique replica count by one.


> I was hoping that we can stream the data, but nodetool rebuild is for
> bringing up a new data center. I just re-created the instance and I don't
> see much going on except keyspaces are being re-created with some data
> file. I thought Cassandra would automatically stream data from replicas...
>

Note that :

1) in order for replace_address to work, you need to set initial_token in
the conf file
2) the node can't be in its own seed list, or it can't bootstrap

=Rob