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 6263F5606 for ; Thu, 12 May 2011 08:45:49 +0000 (UTC) Received: (qmail 75229 invoked by uid 500); 12 May 2011 08:45:47 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 75201 invoked by uid 500); 12 May 2011 08:45:47 -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 75193 invoked by uid 99); 12 May 2011 08:45:47 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 May 2011 08:45:47 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.85.216.179] (HELO mail-qy0-f179.google.com) (209.85.216.179) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 May 2011 08:45:39 +0000 Received: by qyk7 with SMTP id 7so813594qyk.10 for ; Thu, 12 May 2011 01:45:18 -0700 (PDT) MIME-Version: 1.0 Received: by 10.224.135.133 with SMTP id n5mr8586962qat.392.1305189918273; Thu, 12 May 2011 01:45:18 -0700 (PDT) Sender: david@daotown.com Received: by 10.229.111.85 with HTTP; Thu, 12 May 2011 01:45:18 -0700 (PDT) X-Originating-IP: [62.90.201.82] Date: Thu, 12 May 2011 11:45:18 +0300 X-Google-Sender-Auth: ZGWSr4v3TBTBFdEnKsQJ_5mcs7I Message-ID: Subject: Import/Export of Schema Migrations From: David Boxenhorn To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=000e0cd1041e7171e904a3103575 --000e0cd1041e7171e904a3103575 Content-Type: text/plain; charset=ISO-8859-1 My use case is like this: I have a development cluster, a staging cluster and a production cluster. When I finish a set of migrations (i.e. changes) on the development cluster, I want to apply them to the staging cluster, and eventually the production cluster. I don't want to do it by hand, because it's a painful and error-prone process. What I would like to do is export the last N migrations from the development cluster as a text file, with exactly the same format as the original text commands, and import them to the staging and production clusters. I think the best place to do this might be the CLI, since you would probably want to view your migrations before exporting them. Something like this: show migrations N; Shows the last N migrations. export migrations N ; Exports the last N migrations to file fileName. import migrations ; Imports migrations from fileName. The import process would apply the migrations one at a time giving you feedback like, "applying migration: update column family...". If a migration fails, the process should give an appropriate message and stop. Is anyone else interested in this? I have created a Jira ticket for it here: https://issues.apache.org/jira/browse/CASSANDRA-2636 --000e0cd1041e7171e904a3103575 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
My use= case is like this: I have a development cluster, a staging cluster and a p= roduction cluster. When I finish a set of migrations (i.e. changes) on the = development cluster, I want to apply them to the staging cluster, and event= ually the production cluster. I don't want to do it by hand, because it= 's a painful and error-prone process. What I would like to do is export= the last N migrations from the development cluster as a text file, with ex= actly the same format as the original text commands, and import them to the= staging and production clusters.

I think the best place to do this might be the CLI, since you would pro= bably want to view your migrations before exporting them. Something like th= is:

show migrati= ons N;=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Shows the l= ast N migrations.
export migrations N <= ;fileName>;=A0=A0=A0=A0=A0=A0 Exports the last N migrations to file file= Name.
import migrations <fileName>= ; =A0=A0=A0=A0=A0=A0=A0 Imports migrations from fileName.

The import process would apply the migrations one at a time giving you = feedback like, "applying migration: update column family...". If = a migration fails, the process should give an appropriate message and stop.=

Is anyone else interested in this? I have created a Jira ticket for it = here:

https://issues.apache.org/jira/browse/CASSANDRA-2636


--000e0cd1041e7171e904a3103575--