Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DB4A7102E2 for ; Mon, 2 Dec 2013 20:10:52 +0000 (UTC) Received: (qmail 94723 invoked by uid 500); 2 Dec 2013 20:10:50 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 94695 invoked by uid 500); 2 Dec 2013 20:10:50 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 94687 invoked by uid 99); 2 Dec 2013 20:10:50 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Dec 2013 20:10:50 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of rcoli@eventbrite.com designates 209.85.220.169 as permitted sender) Received: from [209.85.220.169] (HELO mail-vc0-f169.google.com) (209.85.220.169) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Dec 2013 20:10:44 +0000 Received: by mail-vc0-f169.google.com with SMTP id hu19so9096815vcb.0 for ; Mon, 02 Dec 2013 12:10:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=p9KmS5khRu6HZJya5yWx7PH4WZO2ZsmqQ9JONbKkwzo=; b=XTXfQ6fniL3gUvr/YSbcYStXwidgmf8WPrGc+mAw6LeOGlcof8hu9CSpvAEU1k13eN 0yufe9XrROOtsX/5UlRrw66qqOE2DT7GY7yrf6vOSK93BPbp6/OxRpIxzJK4MzF90llp 5xW3q1QvkCTWEHB2J3Es5sVXb4bsDVRD5RlQiT119kE8zcWQHmWd5aunoK+uAk4ct+LN qsmistAR+xIXk9IJPBWu+plw5mr/I3wQwFnS1izdnnpsszion5lZj36yK9DmghIPiS3N oD0jikV63T//0X2A5v8g1uI/AXRcxBscwuIUQmQSXpLVgQ2qymDym9pM7t4oJS9dMWhL as0A== X-Gm-Message-State: ALoCoQlqKcR84QgGM8ZNJz4Gh38Io7QubwK3cEBZvoI71Xc+a9lZTZU5AZ+8UsENuTu4ipCqeNFC MIME-Version: 1.0 X-Received: by 10.58.144.168 with SMTP id sn8mr1677704veb.33.1386015023846; Mon, 02 Dec 2013 12:10:23 -0800 (PST) Received: by 10.220.150.3 with HTTP; Mon, 2 Dec 2013 12:10:23 -0800 (PST) In-Reply-To: <6A189B4A-D3FB-4BA9-9638-A976153C3142@gmail.com> References: <6A189B4A-D3FB-4BA9-9638-A976153C3142@gmail.com> Date: Mon, 2 Dec 2013 12:10:23 -0800 Message-ID: Subject: Re: Table Creation Error From: Robert Coli To: "user@cassandra.apache.org" Content-Type: multipart/alternative; boundary=047d7b5da93b26783304ec92c5bd X-Virus-Checked: Checked by ClamAV on apache.org --047d7b5da93b26783304ec92c5bd Content-Type: text/plain; charset=ISO-8859-1 On Mon, Dec 2, 2013 at 11:54 AM, Charlie Andrews < charlieandrews.cwa@gmail.com> wrote: > I am on version 2.0.2. Do you have any resources on how to dump and reload > the schema? > I guess I should write a blog post on this guy, but the rough outline is : 1) echo "DESCRIBE KEYSPACE ;" | cqlsh > keyspace_name.schema.cqlsh 2) DROP KEYSPACE ; 3) use the contents of keyspace_name.schema.cqlsh to re-create your schema For step 3 you can probably do it en masse via another pipe through cqlsh, but I would probably do it manually unless I had a huge amount of schema. You should probably keep a schema dump in general, for recovery purposes. =Rob PS - thx to devdazed for testing out the cqlsh syntax, I only use cassandra-cli in my current deploys.. --047d7b5da93b26783304ec92c5bd Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On Mon, Dec 2, 2013 at 11:54 AM, Charlie Andrews <charlieandrews.cwa@gmail.com> wrote:
I am on version 2.0.2. Do you have any resources on how = to dump and reload the schema?

I guess I should write a blog post on this= guy, but the rough outline is :

1) echo "DES= CRIBE KEYSPACE <keyspace_name>;" | cqlsh > keyspace_name.sche= ma.cqlsh
2) DROP KEYSPACE <keyspace_name>;
3) use the contents = of keyspace_name.schema.cqlsh to re-create your schema

=
For step 3 you can probably do it en masse via another pipe through cq= lsh, but I would probably do it manually unless I had a huge amount of sche= ma. You should probably keep a schema dump in general, for recovery purpose= s.

=3DRob
PS - thx to devdazed for testing out t= he cqlsh syntax, I only use cassandra-cli in my current deploys..
--047d7b5da93b26783304ec92c5bd--