Re: Restore cassandra snapshots
Hi Jean, Thank you very much for verifying the steps. Regards. On Wed, Oct 18, 2017 at 11:52 AM, Jean Carlowrote: > Hi Pradeep, > > Because you use sstableloader, you don't need to restore de system > keyspace. > > Your procedure is correct to me. > > Best regards > > On Oct 18, 2017 4:22 AM, "Pradeep Chhetri" wrote: > > Hi Anthony > > I did the following steps to restore. Please let me know if I missed > something. > > - Took snapshots on the 3 nodes of the existing cluster simultaneously > - copied that snapshots respectively on the 3 nodes of the freshly created > cluster > - ran sstableloader on each of the application table. ( I didn't restore > the system related tables ) on all of three node. > > I was assuming that since I ran from all the three snapshots, all the > tokens should be there so thought that this will not cause any data loss. > > Do you see that I might have data loss. I am not sure how to verify > the data loss although I did ran count of few table to verify the row count. > > Thank you the help. > > > On Wed, 18 Oct 2017 at 5:39 AM, Anthony Grasso > wrote: > >> Hi Pradeep, >> >> If you are going to copy N snapshots to N nodes you will need to make >> sure you have the System keyspace as part of that snapshot. The System >> keyspace that is local to each node, contains the token allocations for >> that particular node. This allows the node to work out what data it is >> responsible for. Further to that, if you are restoring the System keyspace >> from snapshots, make sure that the cluster name of the new cluster is >> exactly the same as the cluster which generated the System keyspace >> snapshots. >> >> Regards, >> Anthony >> >> On 16 October 2017 at 23:28, Jean Carlo >> wrote: >> >>> HI, >>> >>> Yes of course, you can use sstableloader from every sstable to your new >>> cluster. Actually this is the common procedure. Just check the log of >>> cassandra, you shouldn't see any errors of streaming. >>> >>> >>> However, because the fact you are migrating from on cluster of N nodes >>> to another of N nodes, I believe you can just copy and paste your data node >>> per node and make a nodetool refresh. Checking obviously the correct names >>> of your sstables. >>> You can check the tokens of your node using nodetool info -T >>> >>> But I think sstableloader is the easy way :) >>> >>> >>> >>> >>> Saludos >>> >>> Jean Carlo >>> >>> "The best way to predict the future is to invent it" Alan Kay >>> >>> On Mon, Oct 16, 2017 at 1:55 PM, Pradeep Chhetri >>> wrote: >>> Hi Jean, Thank you for the quick response. I am not sure how to achieve that. Can i set the tokens for a node via cqlsh ? I know that i can check the nodetool rings to get the tokens allocated to a node. I was thinking to basically run sstableloader for each of the snapshots and was assuming it will load the complete data properly. Isn't that the case. Thank you. On Mon, Oct 16, 2017 at 5:21 PM, Jean Carlo wrote: > Hi, > > Be sure that you have the same tokens distribution than your original > cluster. So if you are going to restore from old node 1 to new node 1, > make > sure that the new node and the old node have the same tokens. > > > Saludos > > Jean Carlo > > "The best way to predict the future is to invent it" Alan Kay > > On Mon, Oct 16, 2017 at 1:40 PM, Pradeep Chhetri < > prad...@stashaway.com> wrote: > >> Hi, >> >> I am trying to restore an empty 3-node cluster with the three >> snapshots taken on another 3-node cluster. >> >> What is the best approach to achieve it without loosing any data >> present in the snapshot. >> >> Thank you. >> Pradeep >> > > >>> >> >
Re: Restore cassandra snapshots
Hi Pradeep, Because you use sstableloader, you don't need to restore de system keyspace. Your procedure is correct to me. Best regards On Oct 18, 2017 4:22 AM, "Pradeep Chhetri"wrote: Hi Anthony I did the following steps to restore. Please let me know if I missed something. - Took snapshots on the 3 nodes of the existing cluster simultaneously - copied that snapshots respectively on the 3 nodes of the freshly created cluster - ran sstableloader on each of the application table. ( I didn't restore the system related tables ) on all of three node. I was assuming that since I ran from all the three snapshots, all the tokens should be there so thought that this will not cause any data loss. Do you see that I might have data loss. I am not sure how to verify the data loss although I did ran count of few table to verify the row count. Thank you the help. On Wed, 18 Oct 2017 at 5:39 AM, Anthony Grasso wrote: > Hi Pradeep, > > If you are going to copy N snapshots to N nodes you will need to make sure > you have the System keyspace as part of that snapshot. The System keyspace > that is local to each node, contains the token allocations for that > particular node. This allows the node to work out what data it is > responsible for. Further to that, if you are restoring the System keyspace > from snapshots, make sure that the cluster name of the new cluster is > exactly the same as the cluster which generated the System keyspace > snapshots. > > Regards, > Anthony > > On 16 October 2017 at 23:28, Jean Carlo wrote: > >> HI, >> >> Yes of course, you can use sstableloader from every sstable to your new >> cluster. Actually this is the common procedure. Just check the log of >> cassandra, you shouldn't see any errors of streaming. >> >> >> However, because the fact you are migrating from on cluster of N nodes to >> another of N nodes, I believe you can just copy and paste your data node >> per node and make a nodetool refresh. Checking obviously the correct names >> of your sstables. >> You can check the tokens of your node using nodetool info -T >> >> But I think sstableloader is the easy way :) >> >> >> >> >> Saludos >> >> Jean Carlo >> >> "The best way to predict the future is to invent it" Alan Kay >> >> On Mon, Oct 16, 2017 at 1:55 PM, Pradeep Chhetri >> wrote: >> >>> Hi Jean, >>> >>> Thank you for the quick response. I am not sure how to achieve that. Can >>> i set the tokens for a node via cqlsh ? >>> >>> I know that i can check the nodetool rings to get the tokens allocated >>> to a node. >>> >>> I was thinking to basically run sstableloader for each of the snapshots >>> and was assuming it will load the complete data properly. Isn't that the >>> case. >>> >>> Thank you. >>> >>> On Mon, Oct 16, 2017 at 5:21 PM, Jean Carlo >>> wrote: >>> Hi, Be sure that you have the same tokens distribution than your original cluster. So if you are going to restore from old node 1 to new node 1, make sure that the new node and the old node have the same tokens. Saludos Jean Carlo "The best way to predict the future is to invent it" Alan Kay On Mon, Oct 16, 2017 at 1:40 PM, Pradeep Chhetri wrote: > Hi, > > I am trying to restore an empty 3-node cluster with the three > snapshots taken on another 3-node cluster. > > What is the best approach to achieve it without loosing any data > present in the snapshot. > > Thank you. > Pradeep > >>> >> >
Re: Restore cassandra snapshots
Hi Anthony I did the following steps to restore. Please let me know if I missed something. - Took snapshots on the 3 nodes of the existing cluster simultaneously - copied that snapshots respectively on the 3 nodes of the freshly created cluster - ran sstableloader on each of the application table. ( I didn't restore the system related tables ) on all of three node. I was assuming that since I ran from all the three snapshots, all the tokens should be there so thought that this will not cause any data loss. Do you see that I might have data loss. I am not sure how to verify the data loss although I did ran count of few table to verify the row count. Thank you the help. On Wed, 18 Oct 2017 at 5:39 AM, Anthony Grassowrote: > Hi Pradeep, > > If you are going to copy N snapshots to N nodes you will need to make sure > you have the System keyspace as part of that snapshot. The System keyspace > that is local to each node, contains the token allocations for that > particular node. This allows the node to work out what data it is > responsible for. Further to that, if you are restoring the System keyspace > from snapshots, make sure that the cluster name of the new cluster is > exactly the same as the cluster which generated the System keyspace > snapshots. > > Regards, > Anthony > > On 16 October 2017 at 23:28, Jean Carlo wrote: > >> HI, >> >> Yes of course, you can use sstableloader from every sstable to your new >> cluster. Actually this is the common procedure. Just check the log of >> cassandra, you shouldn't see any errors of streaming. >> >> >> However, because the fact you are migrating from on cluster of N nodes to >> another of N nodes, I believe you can just copy and paste your data node >> per node and make a nodetool refresh. Checking obviously the correct names >> of your sstables. >> You can check the tokens of your node using nodetool info -T >> >> But I think sstableloader is the easy way :) >> >> >> >> >> Saludos >> >> Jean Carlo >> >> "The best way to predict the future is to invent it" Alan Kay >> >> On Mon, Oct 16, 2017 at 1:55 PM, Pradeep Chhetri >> wrote: >> >>> Hi Jean, >>> >>> Thank you for the quick response. I am not sure how to achieve that. Can >>> i set the tokens for a node via cqlsh ? >>> >>> I know that i can check the nodetool rings to get the tokens allocated >>> to a node. >>> >>> I was thinking to basically run sstableloader for each of the snapshots >>> and was assuming it will load the complete data properly. Isn't that the >>> case. >>> >>> Thank you. >>> >>> On Mon, Oct 16, 2017 at 5:21 PM, Jean Carlo >>> wrote: >>> Hi, Be sure that you have the same tokens distribution than your original cluster. So if you are going to restore from old node 1 to new node 1, make sure that the new node and the old node have the same tokens. Saludos Jean Carlo "The best way to predict the future is to invent it" Alan Kay On Mon, Oct 16, 2017 at 1:40 PM, Pradeep Chhetri wrote: > Hi, > > I am trying to restore an empty 3-node cluster with the three > snapshots taken on another 3-node cluster. > > What is the best approach to achieve it without loosing any data > present in the snapshot. > > Thank you. > Pradeep > >>> >> >
Re: Restore cassandra snapshots
Hi Pradeep, If you are going to copy N snapshots to N nodes you will need to make sure you have the System keyspace as part of that snapshot. The System keyspace that is local to each node, contains the token allocations for that particular node. This allows the node to work out what data it is responsible for. Further to that, if you are restoring the System keyspace from snapshots, make sure that the cluster name of the new cluster is exactly the same as the cluster which generated the System keyspace snapshots. Regards, Anthony On 16 October 2017 at 23:28, Jean Carlowrote: > HI, > > Yes of course, you can use sstableloader from every sstable to your new > cluster. Actually this is the common procedure. Just check the log of > cassandra, you shouldn't see any errors of streaming. > > > However, because the fact you are migrating from on cluster of N nodes to > another of N nodes, I believe you can just copy and paste your data node > per node and make a nodetool refresh. Checking obviously the correct names > of your sstables. > You can check the tokens of your node using nodetool info -T > > But I think sstableloader is the easy way :) > > > > > Saludos > > Jean Carlo > > "The best way to predict the future is to invent it" Alan Kay > > On Mon, Oct 16, 2017 at 1:55 PM, Pradeep Chhetri > wrote: > >> Hi Jean, >> >> Thank you for the quick response. I am not sure how to achieve that. Can >> i set the tokens for a node via cqlsh ? >> >> I know that i can check the nodetool rings to get the tokens allocated to >> a node. >> >> I was thinking to basically run sstableloader for each of the snapshots >> and was assuming it will load the complete data properly. Isn't that the >> case. >> >> Thank you. >> >> On Mon, Oct 16, 2017 at 5:21 PM, Jean Carlo >> wrote: >> >>> Hi, >>> >>> Be sure that you have the same tokens distribution than your original >>> cluster. So if you are going to restore from old node 1 to new node 1, make >>> sure that the new node and the old node have the same tokens. >>> >>> >>> Saludos >>> >>> Jean Carlo >>> >>> "The best way to predict the future is to invent it" Alan Kay >>> >>> On Mon, Oct 16, 2017 at 1:40 PM, Pradeep Chhetri >>> wrote: >>> Hi, I am trying to restore an empty 3-node cluster with the three snapshots taken on another 3-node cluster. What is the best approach to achieve it without loosing any data present in the snapshot. Thank you. Pradeep >>> >>> >> >
Re: Restore cassandra snapshots
sstableloader will work just fine. Regards, Nitan K. Cassandra and Oracle Architect/SME Datastax Certified Cassandra expert Oracle 10g Certified On Mon, Oct 16, 2017 at 8:10 AM, Pradeep Chhetriwrote: > Quick questions - 1) I have around 2GB of cassandra snapshot - do you > suggest using sstableloader 2) What do you mean by "restore option" - do > you mean copying snapshot dir directly to the nodes of the new cluster ? > > On Mon, Oct 16, 2017 at 6:19 PM, Nitan Kainth > wrote: > >> Sstableloader is good for small dataset, for bigger snapshots restore is >> a better option >> >> Sent from my iPhone >> >> On Oct 16, 2017, at 7:28 AM, Jean Carlo >> wrote: >> >> HI, >> >> Yes of course, you can use sstableloader from every sstable to your new >> cluster. Actually this is the common procedure. Just check the log of >> cassandra, you shouldn't see any errors of streaming. >> >> >> However, because the fact you are migrating from on cluster of N nodes to >> another of N nodes, I believe you can just copy and paste your data node >> per node and make a nodetool refresh. Checking obviously the correct names >> of your sstables. >> You can check the tokens of your node using nodetool info -T >> >> But I think sstableloader is the easy way :) >> >> >> >> >> Saludos >> >> Jean Carlo >> >> "The best way to predict the future is to invent it" Alan Kay >> >> On Mon, Oct 16, 2017 at 1:55 PM, Pradeep Chhetri >> wrote: >> >>> Hi Jean, >>> >>> Thank you for the quick response. I am not sure how to achieve that. Can >>> i set the tokens for a node via cqlsh ? >>> >>> I know that i can check the nodetool rings to get the tokens allocated >>> to a node. >>> >>> I was thinking to basically run sstableloader for each of the snapshots >>> and was assuming it will load the complete data properly. Isn't that the >>> case. >>> >>> Thank you. >>> >>> On Mon, Oct 16, 2017 at 5:21 PM, Jean Carlo >>> wrote: >>> Hi, Be sure that you have the same tokens distribution than your original cluster. So if you are going to restore from old node 1 to new node 1, make sure that the new node and the old node have the same tokens. Saludos Jean Carlo "The best way to predict the future is to invent it" Alan Kay On Mon, Oct 16, 2017 at 1:40 PM, Pradeep Chhetri wrote: > Hi, > > I am trying to restore an empty 3-node cluster with the three > snapshots taken on another 3-node cluster. > > What is the best approach to achieve it without loosing any data > present in the snapshot. > > Thank you. > Pradeep > >>> >> >
Re: Restore cassandra snapshots
Quick questions - 1) I have around 2GB of cassandra snapshot - do you suggest using sstableloader 2) What do you mean by "restore option" - do you mean copying snapshot dir directly to the nodes of the new cluster ? On Mon, Oct 16, 2017 at 6:19 PM, Nitan Kainthwrote: > Sstableloader is good for small dataset, for bigger snapshots restore is a > better option > > Sent from my iPhone > > On Oct 16, 2017, at 7:28 AM, Jean Carlo wrote: > > HI, > > Yes of course, you can use sstableloader from every sstable to your new > cluster. Actually this is the common procedure. Just check the log of > cassandra, you shouldn't see any errors of streaming. > > > However, because the fact you are migrating from on cluster of N nodes to > another of N nodes, I believe you can just copy and paste your data node > per node and make a nodetool refresh. Checking obviously the correct names > of your sstables. > You can check the tokens of your node using nodetool info -T > > But I think sstableloader is the easy way :) > > > > > Saludos > > Jean Carlo > > "The best way to predict the future is to invent it" Alan Kay > > On Mon, Oct 16, 2017 at 1:55 PM, Pradeep Chhetri > wrote: > >> Hi Jean, >> >> Thank you for the quick response. I am not sure how to achieve that. Can >> i set the tokens for a node via cqlsh ? >> >> I know that i can check the nodetool rings to get the tokens allocated to >> a node. >> >> I was thinking to basically run sstableloader for each of the snapshots >> and was assuming it will load the complete data properly. Isn't that the >> case. >> >> Thank you. >> >> On Mon, Oct 16, 2017 at 5:21 PM, Jean Carlo >> wrote: >> >>> Hi, >>> >>> Be sure that you have the same tokens distribution than your original >>> cluster. So if you are going to restore from old node 1 to new node 1, make >>> sure that the new node and the old node have the same tokens. >>> >>> >>> Saludos >>> >>> Jean Carlo >>> >>> "The best way to predict the future is to invent it" Alan Kay >>> >>> On Mon, Oct 16, 2017 at 1:40 PM, Pradeep Chhetri >>> wrote: >>> Hi, I am trying to restore an empty 3-node cluster with the three snapshots taken on another 3-node cluster. What is the best approach to achieve it without loosing any data present in the snapshot. Thank you. Pradeep >>> >>> >> >
Re: Restore cassandra snapshots
Sstableloader is good for small dataset, for bigger snapshots restore is a better option Sent from my iPhone > On Oct 16, 2017, at 7:28 AM, Jean Carlowrote: > > HI, > > Yes of course, you can use sstableloader from every sstable to your new > cluster. Actually this is the common procedure. Just check the log of > cassandra, you shouldn't see any errors of streaming. > > > However, because the fact you are migrating from on cluster of N nodes to > another of N nodes, I believe you can just copy and paste your data node per > node and make a nodetool refresh. Checking obviously the correct names of > your sstables. > You can check the tokens of your node using nodetool info -T > > But I think sstableloader is the easy way :) > > > > > Saludos > > Jean Carlo > > "The best way to predict the future is to invent it" Alan Kay > >> On Mon, Oct 16, 2017 at 1:55 PM, Pradeep Chhetri >> wrote: >> Hi Jean, >> >> Thank you for the quick response. I am not sure how to achieve that. Can i >> set the tokens for a node via cqlsh ? >> >> I know that i can check the nodetool rings to get the tokens allocated to a >> node. >> >> I was thinking to basically run sstableloader for each of the snapshots and >> was assuming it will load the complete data properly. Isn't that the case. >> >> Thank you. >> >>> On Mon, Oct 16, 2017 at 5:21 PM, Jean Carlo >>> wrote: >>> Hi, >>> >>> Be sure that you have the same tokens distribution than your original >>> cluster. So if you are going to restore from old node 1 to new node 1, make >>> sure that the new node and the old node have the same tokens. >>> >>> >>> Saludos >>> >>> Jean Carlo >>> >>> "The best way to predict the future is to invent it" Alan Kay >>> On Mon, Oct 16, 2017 at 1:40 PM, Pradeep Chhetri wrote: Hi, I am trying to restore an empty 3-node cluster with the three snapshots taken on another 3-node cluster. What is the best approach to achieve it without loosing any data present in the snapshot. Thank you. Pradeep >>> >> >
Re: Restore cassandra snapshots
HI, Yes of course, you can use sstableloader from every sstable to your new cluster. Actually this is the common procedure. Just check the log of cassandra, you shouldn't see any errors of streaming. However, because the fact you are migrating from on cluster of N nodes to another of N nodes, I believe you can just copy and paste your data node per node and make a nodetool refresh. Checking obviously the correct names of your sstables. You can check the tokens of your node using nodetool info -T But I think sstableloader is the easy way :) Saludos Jean Carlo "The best way to predict the future is to invent it" Alan Kay On Mon, Oct 16, 2017 at 1:55 PM, Pradeep Chhetriwrote: > Hi Jean, > > Thank you for the quick response. I am not sure how to achieve that. Can i > set the tokens for a node via cqlsh ? > > I know that i can check the nodetool rings to get the tokens allocated to > a node. > > I was thinking to basically run sstableloader for each of the snapshots > and was assuming it will load the complete data properly. Isn't that the > case. > > Thank you. > > On Mon, Oct 16, 2017 at 5:21 PM, Jean Carlo > wrote: > >> Hi, >> >> Be sure that you have the same tokens distribution than your original >> cluster. So if you are going to restore from old node 1 to new node 1, make >> sure that the new node and the old node have the same tokens. >> >> >> Saludos >> >> Jean Carlo >> >> "The best way to predict the future is to invent it" Alan Kay >> >> On Mon, Oct 16, 2017 at 1:40 PM, Pradeep Chhetri >> wrote: >> >>> Hi, >>> >>> I am trying to restore an empty 3-node cluster with the three snapshots >>> taken on another 3-node cluster. >>> >>> What is the best approach to achieve it without loosing any data present >>> in the snapshot. >>> >>> Thank you. >>> Pradeep >>> >> >> >
Re: Restore cassandra snapshots
Hi Jean, Thank you for the quick response. I am not sure how to achieve that. Can i set the tokens for a node via cqlsh ? I know that i can check the nodetool rings to get the tokens allocated to a node. I was thinking to basically run sstableloader for each of the snapshots and was assuming it will load the complete data properly. Isn't that the case. Thank you. On Mon, Oct 16, 2017 at 5:21 PM, Jean Carlowrote: > Hi, > > Be sure that you have the same tokens distribution than your original > cluster. So if you are going to restore from old node 1 to new node 1, make > sure that the new node and the old node have the same tokens. > > > Saludos > > Jean Carlo > > "The best way to predict the future is to invent it" Alan Kay > > On Mon, Oct 16, 2017 at 1:40 PM, Pradeep Chhetri > wrote: > >> Hi, >> >> I am trying to restore an empty 3-node cluster with the three snapshots >> taken on another 3-node cluster. >> >> What is the best approach to achieve it without loosing any data present >> in the snapshot. >> >> Thank you. >> Pradeep >> > >
Re: Restore cassandra snapshots
Hi, Be sure that you have the same tokens distribution than your original cluster. So if you are going to restore from old node 1 to new node 1, make sure that the new node and the old node have the same tokens. Saludos Jean Carlo "The best way to predict the future is to invent it" Alan Kay On Mon, Oct 16, 2017 at 1:40 PM, Pradeep Chhetriwrote: > Hi, > > I am trying to restore an empty 3-node cluster with the three snapshots > taken on another 3-node cluster. > > What is the best approach to achieve it without loosing any data present > in the snapshot. > > Thank you. > Pradeep >
Re: restore cassandra snapshots on a smaller cluster
It should definitely work if you use sstableloader to load all the files. I imagine it is possible doing a straight restore (copy sstables) if you assign the tokens from multiple source nodes to one target node using the initial_token parameter in cassandra.yaml. Cheers Ben On Wed, 18 May 2016 at 10:35 Luigi Tagliamontewrote: > Hi everyone, > i'm wondering if it is possible to restore all the snapshots of a cluster > (10 nodes) in a smaller cluster (3 nodes)? If yes how to do it? > > -- > Luigi > --- > “The only way to get smarter is by playing a smarter opponent.” > -- Ben Slater Chief Product Officer, Instaclustr +61 437 929 798
Re: restore cassandra snapshots on a smaller cluster
http://www.datastax.com/dev/blog/using-the-cassandra-bulk-loader-updated From: Luigi Tagliamonte Reply-To: "user@cassandra.apache.org" Date: Tuesday, May 17, 2016 at 5:35 PM To: "user@cassandra.apache.org" Subject: restore cassandra snapshots on a smaller cluster Hi everyone, i'm wondering if it is possible to restore all the snapshots of a cluster (10 nodes) in a smaller cluster (3 nodes)? If yes how to do it? -- Luigi --- “The only way to get smarter is by playing a smarter opponent.” smime.p7s Description: S/MIME cryptographic signature