Skip to content

Instantly share code, notes, and snippets.

EPOCH_START=1472838
JBOD_DRIVES=/app/cassandra/datastax/dse-data*
SNAPSHOT_DATE="Sep 2"
SNAPSHOT_TIME="10:4"
## don't edit below
declare -A refresh_tables
SNAPS=$(ls -R $JBOD_DRIVES | grep $EPOCH_START | grep "app/")
@ibspoof
ibspoof / downgrade_oss_to_dse.md
Last active June 23, 2017 13:46
Steps to Migrate from Apache Cassandra OSS to DSE Cassandra

Steps to Migrate from OSS C* 3.x to DSE 5.x

1. Change Existing Nodes to GPFS

  1. Change cassandra-rackdc.properties to:
  2. dc=datacenter1
  3. rack=rack1
  4. Change cassandra.yaml snitch: GossipingPropertyFileSnitch
  5. Rolling restart of nodes: nodetool flush && nodetool drain && service cassandra stop
  6. Update application specific keyspaces to use NetworkTopology w/ only existing DC
  7. ALTER KEYSPACE {keyspace} WITH replication = {'class': 'NetworkTopologyStrategy', 'datacenter1': '3'} AND durable_writes = true;
@ibspoof
ibspoof / dse_5_0_x_installer.sh
Last active May 19, 2017 01:09
Azure/AWS Installer Script for DSE 5.0.x
#!/bin/bash
########################################################################
### ###
### Install Script to install DSE 5.0 on Ubuntu or CentOS ###
### created by Brad Vernon brad.vernon@datastax.com ###
### ###
########################################################################
# AWS Instance gathering, do not delete
@ibspoof
ibspoof / nodetool_diff.py
Last active December 28, 2019 00:22
nodetool tablestat difference tool
#!/usr/bin/env python
import re
import sys
REGEX_KEYSPACE = re.compile(r'^Keyspace: (.*)|^Keyspace : (.*)')
REGEX_TABLE = re.compile(r'^\t\tTable: (.*)')
REGEX_READ_CNT = re.compile(r'^\t\tLocal read count: (.*)')
REGEX_WRITE_CNT = re.compile(r'^\t\tLocal write count: (.*)')
##
@ibspoof
ibspoof / restore_node_from_opscenter_backups.ini
Last active February 22, 2019 16:04
Restore a single nodes SSTables from OpsCenters S3 Backup Location using multi-threaded downloads
[s3]
#s3 bucket name
bucket_name = my_backups
download_threads = 6
# other s3 access is defined in the default aws cli settings file
[opscenter]
backup_job_uuid = # get this from s3 bucket
[node]