You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by onmstester onmstester <on...@zoho.com> on 2018/03/08 06:05:50 UTC

backup/restore cassandra data

Would it be possible to copy/paste Cassandra data directory from one of nodes (which Its OS partition corrupted) and use it in a fresh Cassandra node? I've used rf=1 so that's my only chance!



Sent using Zoho Mail






Re: backup/restore cassandra data

Posted by Dipan Shah <di...@hotmail.com>.
Commitlog gets truncated once the relevant data is written to sstables. So you cant use to replay all the data stored in the node.

Also, snapshots are not automatic. You need to run snapshot command on all the nodes of your cluster. Snapshots only get created automatically if you run a truncate command or a split operation (as far as I know).

The positive thing in your scenario is that your data directories are intact and  you can use that directly as an effective snapshot as Ben suggested. You will only have to ensure that the new node has the same token range and also has the table schema.


Thanks,

Dipan Shah

________________________________
From: onmstester onmstester <on...@zoho.com>
Sent: Thursday, March 8, 2018 1:31 PM
To: user
Subject: Re: backup/restore cassandra data

Thanks
But is'nt there a method to restore the node as it was before the crash, like commitlog and every last data inserted?
How often snapshots would be created? Shouldn't they be created manually by nodetool?  I haven't created snapshots on the node!


Sent using Zoho Mail<https://www.zoho.com/mail/>


---- On Thu, 08 Mar 2018 09:41:29 +0330 Ben Slater <be...@instaclustr.com> wrote ----

You should be able to follow the same approach(s) as restoring from a backup as outlined here: https://docs.datastax.com/en/cassandra/2.1/cassandra/operations/ops_backup_snapshot_restore_t.html#ops_backup_snapshot_restore_t

Cheers
Ben

On Thu, 8 Mar 2018 at 17:07 onmstester onmstester <on...@zoho.com>> wrote:

--

Ben Slater
Chief Product Officer
[https://cdn2.hubspot.net/hubfs/2549680/Instaclustr-Navy-logo-new.png]<https://www.instaclustr.com/>

[http://cdn2.hubspot.net/hubfs/184235/dev_images/signature_app/facebook_sig.png]<https://www.facebook.com/instaclustr>  [http://cdn2.hubspot.net/hubfs/184235/dev_images/signature_app/twitter_sig.png] <https://twitter.com/instaclustr>   [http://cdn2.hubspot.net/hubfs/184235/dev_images/signature_app/linkedin_sig.png] <https://www.linkedin.com/company/instaclustr>

Read our latest technical blog posts here<https://www.instaclustr.com/blog/>.

This email has been sent on behalf of Instaclustr Pty. Limited (Australia) and Instaclustr Inc (USA).

This email and any attachments may contain confidential and legally privileged information.  If you are not the intended recipient, do not copy or disclose its content, but please reply to this email immediately and highlight the error to the sender and then immediately delete the message.

Would it be possible to copy/paste Cassandra data directory from one of nodes (which Its OS partition corrupted) and use it in a fresh Cassandra node? I've used rf=1 so that's my only chance!


Sent using Zoho Mail<https://www.zoho.com/mail/>




Re: backup/restore cassandra data

Posted by onmstester onmstester <on...@zoho.com>.
Thanks

But is'nt there a method to restore the node as it was before the crash, like commitlog and every last data inserted?

How often snapshots would be created? Shouldn't they be created manually by nodetool?  I haven't created snapshots on the node!



Sent using Zoho Mail






---- On Thu, 08 Mar 2018 09:41:29 +0330 Ben Slater &lt;ben.slater@instaclustr.com&gt; wrote ----




You should be able to follow the same approach(s) as restoring from a backup as outlined here: https://docs.datastax.com/en/cassandra/2.1/cassandra/operations/ops_backup_snapshot_restore_t.html#ops_backup_snapshot_restore_t



Cheers

Ben




On Thu, 8 Mar 2018 at 17:07 onmstester onmstester &lt;onmstester@zoho.com&gt; wrote:




-- 

Ben Slater
Chief Product Officer

    

Read our latest technical blog posts here.

This email has been sent on behalf of Instaclustr Pty. Limited (Australia) and Instaclustr Inc (USA).

This email and any attachments may contain confidential and legally privileged information.  If you are not the intended recipient, do not copy or disclose its content, but please reply to this email immediately and highlight the error to the sender and then immediately delete the message.






Would it be possible to copy/paste Cassandra data directory from one of nodes (which Its OS partition corrupted) and use it in a fresh Cassandra node? I've used rf=1 so that's my only chance!



Sent using Zoho Mail











Re: backup/restore cassandra data

Posted by Ben Slater <be...@instaclustr.com>.
You should be able to follow the same approach(s) as restoring from a
backup as outlined here:
https://docs.datastax.com/en/cassandra/2.1/cassandra/operations/ops_backup_snapshot_restore_t.html#ops_backup_snapshot_restore_t

Cheers
Ben

On Thu, 8 Mar 2018 at 17:07 onmstester onmstester <on...@zoho.com>
wrote:

> Would it be possible to copy/paste Cassandra data directory from one of
> nodes (which Its OS partition corrupted) and use it in a fresh Cassandra
> node? I've used rf=1 so that's my only chance!
>
> Sent using Zoho Mail <https://www.zoho.com/mail/>
>
>
> --


*Ben Slater*

*Chief Product Officer <https://www.instaclustr.com/>*

<https://www.facebook.com/instaclustr>   <https://twitter.com/instaclustr>
<https://www.linkedin.com/company/instaclustr>

Read our latest technical blog posts here
<https://www.instaclustr.com/blog/>.

This email has been sent on behalf of Instaclustr Pty. Limited (Australia)
and Instaclustr Inc (USA).

This email and any attachments may contain confidential and legally
privileged information.  If you are not the intended recipient, do not copy
or disclose its content, but please reply to this email immediately and
highlight the error to the sender and then immediately delete the message.