how to recover cassandra data

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

how to recover cassandra data

john xie
ReplicationFactor = 3

one day i stop 192.168.1.147 and remove cassandra data by mistake, can i recover  192.168.1.147's cassadra data by restart cassandra ?



   <DataFileDirectories>
        <DataFileDirectory>/data1/cassandra/</DataFileDirectory>
        <DataFileDirectory>/data2/cassandra/</DataFileDirectory>
        <DataFileDirectory>/data3/cassandra/</DataFileDirectory>
    </DataFileDirectories>

/data3  mount  /dev/sdd   

i remove /data3 and  formatt /dev/sdd


Address       Status     Load          Range                                      Ring
                                       135438270110006521520577363629178401179    
192.168.1.148 Up         50.38 GB      52435029392953385124849742453833332898     |<--|
192.168.1.145 Up         48.38 GB      63161078970569359253391371326773726097     |   |
192.168.1.147 ?          23.5 GB       79546317728707787532885001681404757282     |   |
192.168.1.146 Up         26.34 GB      135438270110006521520577363629178401179    |-->|






Reply | Threaded
Open this post in threaded view
|

Re: how to recover cassandra data

Edward Capriolo
On Mon, Aug 2, 2010 at 9:11 AM, john xie <[hidden email]> wrote:

> ReplicationFactor = 3
> one day i stop 192.168.1.147 and remove cassandra data by mistake, can i
> recover  192.168.1.147's cassadra data by restart cassandra ?
>
>
>    <DataFileDirectories>
>         <DataFileDirectory>/data1/cassandra/</DataFileDirectory>
>         <DataFileDirectory>/data2/cassandra/</DataFileDirectory>
>         <DataFileDirectory>/data3/cassandra/</DataFileDirectory>
>     </DataFileDirectories>
> /data3  mount  /dev/sdd
> i remove /data3 and  formatt /dev/sdd
>
> Address       Status     Load          Range
>      Ring
>
> 135438270110006521520577363629178401179
> 192.168.1.148 Up         50.38 GB
>  52435029392953385124849742453833332898     |<--|
> 192.168.1.145 Up         48.38 GB
>  63161078970569359253391371326773726097     |   |
> 192.168.1.147 ?          23.5 GB
> 79546317728707787532885001681404757282     |   |
> 192.168.1.146 Up         26.34 GB
>  135438270110006521520577363629178401179    |-->|
>
>
>
>
>
>

Since you have a replication factor of three if you bring a new node
through auto-bootstrap data will migrate back to it since it has two
copies. Nothing is lost.
Reply | Threaded
Open this post in threaded view
|

Re: how to recover cassandra data

Jonathan Shook
Don't forget about the tombstones. (delete markers)
They are still present on the other two nodes, then they will
replicate to the 3rd node and finish off your deleted data.

On Mon, Aug 2, 2010 at 9:30 AM, Edward Capriolo <[hidden email]> wrote:

> On Mon, Aug 2, 2010 at 9:11 AM, john xie <[hidden email]> wrote:
>> ReplicationFactor = 3
>> one day i stop 192.168.1.147 and remove cassandra data by mistake, can i
>> recover  192.168.1.147's cassadra data by restart cassandra ?
>>
>>
>>    <DataFileDirectories>
>>         <DataFileDirectory>/data1/cassandra/</DataFileDirectory>
>>         <DataFileDirectory>/data2/cassandra/</DataFileDirectory>
>>         <DataFileDirectory>/data3/cassandra/</DataFileDirectory>
>>     </DataFileDirectories>
>> /data3  mount  /dev/sdd
>> i remove /data3 and  formatt /dev/sdd
>>
>> Address       Status     Load          Range
>>      Ring
>>
>> 135438270110006521520577363629178401179
>> 192.168.1.148 Up         50.38 GB
>>  52435029392953385124849742453833332898     |<--|
>> 192.168.1.145 Up         48.38 GB
>>  63161078970569359253391371326773726097     |   |
>> 192.168.1.147 ?          23.5 GB
>> 79546317728707787532885001681404757282     |   |
>> 192.168.1.146 Up         26.34 GB
>>  135438270110006521520577363629178401179    |-->|
>>
>>
>>
>>
>>
>>
>
> Since you have a replication factor of three if you bring a new node
> through auto-bootstrap data will migrate back to it since it has two
> copies. Nothing is lost.
>