Python CLI for cassandra snapshots. CLI allows to store and restore snapshot and uses AWS S3 bucket as storage.
Project description
Python Cassandra CLI tool
Descirptoin
CLI has 5 main commands:
- copy-snapshot-folder Copy folder with snapshots from s3 bucket
- restore-snapshot-keyspace Restore Keyspace snapshot from s3 bucket
- restore-snapshot-table Restore Table snapshot from s3 bucket
- store-snapshot-keyspace Take and store Keyspace snapshot to s3 bucket
- store-snapshot-table Take and store Table snapshot to s3 bucket
AWS resources access
AWS S3 bucket
- You need to set -s3(--s3-bucket), -id(--aws-access-key-id) and -key(--aws-secret-access-key) options for the connection to AWS S3 bucket via access key.
- If your host has AWS profile setup in .aws/credentials and/or IAM role with s3 bucket permissons then CLI needs only -s3(--s3-bucket) option.
AWS Systems Manager
- You need to set -sn(--secret-name), -id(--aws-access-key-id) and -key(--aws-secret-access-key) for getting secrest from Paramenter Store.
- If your host has AWS profile setup in .aws/credentials and/or IAM role with SSM permissons then CLI needs only -sn(--secret-name) option.
- Optionally you can change -r(--aws-region) for SSM. Default value is 'us-east-1'
Commands examples:
Store keyspace snapshot on s3
python-cassandra-cli store-snapshot-keyspace -k my_keyspace -t tag-01-keyspace -e dev -s3 my.s3.bucket -h "10.99.3.55" --ssm-secret -sn /cassandra/dev
Store keyspace snapshot on s3 with keyspace schema
python-cassandra-cli store-snapshot-keyspace -k my_keyspace -t tag-01-keyspace -e dev -s3 my.s3.bucket -h "10.99.3.55" --ssm-secret -sn /cassandra/dev --create-keyspace-schema
Store table snapshot on s3 with keyspace schema
python-cassandra-cli store-snapshot-table -k my_keyspace -tn my_table -t tag-01-table -e dev -s3 my.s3.bucket -h "10.99.3.55" --ssm-secret -sn /cassandra/dev --create-keyspace-schema
Resotore table
python-cassandra-cli restore-snapshot-table -sf 1608700346_snapshots_tag-01-keyspace_my_keyspace_develop -t tag-01-table -k my_keyspace -tn my_table -h "10.99.3.55" --ssm-secret -sn /cassandra/dev -s3 my.s3.bucket
Restore table ssl
python-cassandra-cli restore-snapshot-table -sf 1608700346_snapshots_tag-01-table_my_table_develop -t tag-01-table -k my_keyspace -tn my_table -h "10.99.3.55" --ssm-secret -s3 my.s3.bucket -sn /cassandra/dev -cf /etc/cassandra/conf/cassandra.yaml -ks /etc/cassandra/conf/keystore.node0 -ts /etc/cassandra/conf/truststore.node0 -ssl -pt 9142
Restore keyspace ssl with keyspace creation
python-cassandra-cli restore-snapshot-keyspace -sf 608700346_snapshots_tag-01-keyspace_my_keyspace_develop -t tag-01-keyspace -k my_keyspace -h "10.99.3.55" --ssm-secret -s3 my.s3.bucket -sn /cassandra/dev --create-keyspace-schema -e develop -cf /etc/cassandra/conf/cassandra.yaml -ks /etc/cassandra/conf/keystore.node0 -ts /etc/cassandra/conf/truststore.node0 -ssl -pt 9142 --create-keyspace-schema
Copy folder wiht sanpshot on local
python-cassandra-cli copy-snapshot-folder -s3 my.s3.bucket -sf 1608700346_snapshots_tag-01-keyspace_my_keyspace_develop
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for python-cassandra-cli-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e6c8f4cfee79bdc301b5d71e11ad90e4f167752e97ae28badef301ad46dd7b50 |
|
MD5 | 22da6d597c15aef973c97d1e385bc112 |
|
BLAKE2b-256 | fe6b6a63abe56ee08acf6b77eac636cdd0ae5447cef28b2f0bafb61be2883b92 |
Close
Hashes for python_cassandra_cli-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ebc548a533907c35547fdaeef06136d4c36df5951a04a19b662074b95d045ca |
|
MD5 | 248e55346e0c2ecb66a81096d393d233 |
|
BLAKE2b-256 | 47a6bbccf91af4065e6e92bcb552d38539929da475908c175af7166be9c266dc |