You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by "Bonnet Jonathan." <jo...@externe.bnpparibas.com> on 2013/12/13 15:31:52 UTC

Restore with archive commitlog

Hello,

  As i told you i began to explore restore operations, see my config for
archive commit logs:

archive_command=/bin/bash /produits/cassandra/scripts/cassandra-archive.sh
%path %name

restore_command=/bin/bash /produits/cassandra/scripts/cassandra-restore.sh
%from %to

restore_directories=/produits/cassandra/cassandra_data/archived_commit

restore_point_in_time=2013:12:11 17:00:00

My 2 scripts 

cassandra-archive.sh:

bzip2 --best -k $1
mv $1.bz2 /produits/cassandra/cassandra_data/archived_commit/$2.bz2


cassandra-restore.sh:
cp -f $1 $2
bzip2 -d $2


  
For an example, at 2013:12:11 17:30:00 i had truncate a table which belong
to a keyspace with no replication on one node, after that i made a nodetool
flush. So when i restore to 2013:12:11 17:00:00 i expect to have my table
bein fill up again.

The node restart with this config correctly, i see my archive commit log
come back to my commitlogdirectory, seems bizarre to me that these ones
finish by *.out like CommitLog-3-1386927339271.log.out and not just .log.
Everything is normal ?

When i query my table now, this one is still empty. Finaly my restore
doesn't work and i wonder why ?

Do i have to make a restore on all nodes ? my keyspace have no replication
but perhaps restore need same operation on all node.

I miss something, i don't know.

Thanks for your help.



Re: Restore with archive commitlog

Posted by Robert Coli <rc...@eventbrite.com>.
On Mon, Dec 16, 2013 at 2:55 AM, Bonnet Jonathan. <
jonathan.bonnet@externe.bnpparibas.com> wrote:

> The link is not allowed by my company where i Work, so nobody never manage
> to make work a restore with archive commit log ? Strange to me to let this
> option in all new releases of cassandra if it doesn't work.
>

There is a fair amount of code in a lot of open source software which was
added for or because of a single (usually large/prominent) end user shop.
It's a bit strange, but is part of the essential nature of patches : they
are produced by people who need them and have the resources to produce them.

For Cassandra, this list probably includes :

- streaming commit log (netflix)
- replace_token/node (netflix)
- counters (digg/twitter)

etc..

=Rob

Re: Restore with archive commitlog

Posted by "Bonnet Jonathan." <jo...@externe.bnpparibas.com>.
Andrey Ilinykh <ailinykh <at> gmail.com> writes:

> 
> 
> As someone told you this feature was added by Netflix to work with Priam
(cassandra management tool). Priam itself uses it for several months only,
so I doubt if anybody uses this feature in production. Any way, you can ping
guys working on Priam. This is your best bet.
> https://github.com/Netflix/Priam
> 
> 
> Let us know if you can figure out how to use it.
> 
> Thank you,
>   Andrey 
> 

Hello and thanks for answear,


The link is not allowed by my company where i Work, so nobody never manage
to make work a restore with archive commit log ? Strange to me to let this
option in all new releases of cassandra if it doesn't work.

Regards,

Bonnet Jonathan.





Re: Restore with archive commitlog

Posted by Andrey Ilinykh <ai...@gmail.com>.
As someone told you this feature was added by Netflix to work with Priam
(cassandra management tool). Priam itself uses it for several months only,
so I doubt if anybody uses this feature in production. Any way, you can
ping guys working on Priam. This is your best bet.
https://github.com/Netflix/Priam

Let us know if you can figure out how to use it.

Thank you,
  Andrey


On Fri, Dec 13, 2013 at 6:31 AM, Bonnet Jonathan. <
jonathan.bonnet@externe.bnpparibas.com> wrote:

> Hello,
>
>   As i told you i began to explore restore operations, see my config for
> archive commit logs:
>
> archive_command=/bin/bash /produits/cassandra/scripts/cassandra-archive.sh
> %path %name
>
> restore_command=/bin/bash /produits/cassandra/scripts/cassandra-restore.sh
> %from %to
>
> restore_directories=/produits/cassandra/cassandra_data/archived_commit
>
> restore_point_in_time=2013:12:11 17:00:00
>
> My 2 scripts
>
> cassandra-archive.sh:
>
> bzip2 --best -k $1
> mv $1.bz2 /produits/cassandra/cassandra_data/archived_commit/$2.bz2
>
>
> cassandra-restore.sh:
> cp -f $1 $2
> bzip2 -d $2
>
>
>
> For an example, at 2013:12:11 17:30:00 i had truncate a table which belong
> to a keyspace with no replication on one node, after that i made a nodetool
> flush. So when i restore to 2013:12:11 17:00:00 i expect to have my table
> bein fill up again.
>
> The node restart with this config correctly, i see my archive commit log
> come back to my commitlogdirectory, seems bizarre to me that these ones
> finish by *.out like CommitLog-3-1386927339271.log.out and not just .log.
> Everything is normal ?
>
> When i query my table now, this one is still empty. Finaly my restore
> doesn't work and i wonder why ?
>
> Do i have to make a restore on all nodes ? my keyspace have no replication
> but perhaps restore need same operation on all node.
>
> I miss something, i don't know.
>
> Thanks for your help.
>
>
>