{"id":17472873,"url":"https://github.com/deviavir/cassandras3","last_synced_at":"2025-04-22T19:10:11.110Z","repository":{"id":62560979,"uuid":"92502340","full_name":"DeviaVir/cassandras3","owner":"DeviaVir","description":"Cassandra S3 backup, restore and view","archived":false,"fork":false,"pushed_at":"2019-07-11T11:01:26.000Z","size":49,"stargazers_count":7,"open_issues_count":1,"forks_count":15,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-22T19:10:01.221Z","etag":null,"topics":["backup","cassandra","s3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DeviaVir.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-26T11:00:48.000Z","updated_at":"2022-10-27T15:17:55.000Z","dependencies_parsed_at":"2022-11-03T14:45:41.334Z","dependency_job_id":null,"html_url":"https://github.com/DeviaVir/cassandras3","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeviaVir%2Fcassandras3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeviaVir%2Fcassandras3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeviaVir%2Fcassandras3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeviaVir%2Fcassandras3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DeviaVir","download_url":"https://codeload.github.com/DeviaVir/cassandras3/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250306638,"owners_count":21408926,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backup","cassandra","s3"],"created_at":"2024-10-18T17:46:41.301Z","updated_at":"2025-04-22T19:10:11.061Z","avatar_url":"https://github.com/DeviaVir.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Build Status](https://travis-ci.org/DeviaVir/cassandras3.svg)\n\n# cassandras3\nA simple tool to help you backup and restore your cassandra data to and from S3.\n\n## Setup\n\n### AWS\n\nThis utility assumes you have correctly set up a (local) credentials file (via e.g. `aws configure`), it is also possible to pass credentials using the CLI environment variables:\n\n```\nAWS_ACCESS_KEY_ID\nAWS_SECRET_ACCESS_KEY\n```\n\nThe recommended way is to give nodes that run the backups permissions to the bucket via their instance profiles to execute PUT commands. When restoring a backup, we can use a separate user which will have GET permissions.\n\n## Python (pip)\n\n### Installation\n\nOn Debian-based systems, make sure you have installed the `python-pip` package.\n\n```\npip install cassandras3\n```\n\nOr install manually:\n```\ngit clone git@github.com:DeviaVir/cassandras3.git\ncd cassandras3\npython setup.py install\n```\n\n### Usage\n\nMake sure `cassandra` is running, `nodetool` requires it.\n\n#### Backup\n\n```\ncassandras3 backup --keyspace test --bucket test [--region us-east-1]\n```\n\nNote: `[--region us-east-1]` is optional, it is to cache the AWS client API's per region.\n\n#### View\n\n```\ncassandras3 view --keyspace test --hostname test --bucket test [--region us-east-1]\n```\n\nThis will return a list of all available backups to restore from.\n\nNote: `[--region us-east-1]` is optional, it is to cache the AWS client API's per region.\nNote: you do not need to specify the hostname, it is useful if you want to list backups from a different machine.\n\n#### Restore\n\n```\ncassandras3 restore --backup backup-timestamp --hostname test --keyspace test --bucket test [--region us-east-1]\n```\n\nNote: `backup-timestamp` can be retrieved via `cassandras3 view`.\nNote: `[--region us-east-1]` is optional, it is to cache the AWS client API's per region.\nNote: this command assumes the data directories are currently empty, if this restore is executed over a currently running cluster it can behave unexpectedly.\nNote: you do not need to specify the hostname, it is useful if you want to list backups from a different machine.\n\n\n## Docker\n\nYou can use docker in case you are already currently using docker to deploy your cassandra nodes. This allows for easy linking.\n\n### Installation\n\nSimply run:\n\n```\ndocker-compose build\n```\n\nAnd optionally push this to a public or private repository, from which every node that will be running this can pull the image from. (`docker pull [your-private-repository]/cassandras3:latest`)\n\n\n### Usage\n\n#### Backup\n\n```\ndocker run -it \\\n\t-v $HOME/.aws:/home/.aws \\\n\t-v /var/lib/cassandra/data:/var/lib/cassandra/data \\\n\t--link cassandra_node:cassandra \\\n\t cassandras3_app:latest backup --host cassandra --keyspace test --bucket test [--region us-east-1]\n```\n\nNote: the first mount (`-v`) expects AWS to be configured correctly on the host machine. The mount is not necessary when using instance profiles.\nNote: `[--region us-east-1]` is optional, it is to cache the AWS client API's per region.\n\n#### List\n\n```\ndocker run -it \\\n\t-v $HOME/.aws:/home/.aws \\\n\tcassandras3_app:latest view --keyspace test --hostname test --bucket test [--region us-east-1]\n```\n\nNote: the first mount (`-v`) expects AWS to be configured correctly on the host machine. The mount is not necessary when using instance profiles.\nNote: you do not need to specify the hostname, it is useful if you want to list backups from a different machine.\nNote: `[--region us-east-1]` is optional, it is to cache the AWS client API's per region.\n\n#### Restore\n\n```\ndocker run -it \\\n\t-v $HOME/.aws:/home/.aws \\\n\t-v /var/lib/cassandra/data:/var/lib/cassandra/data \\\n\t--link cassandra_node:cassandra \\\n\tcassandras3_app:latest restore --host cassandra --hostname test --keyspace test --bucket test [--region us-east-1]\n```\n\nNote: you do not need to specify the hostname, it is useful if you want to restore a backup from a different machine.\nNote: the first mount (`-v`) expects AWS to be configured correctly on the host machine. The mount is not necessary when using instance profiles.\nNote: this command assumes the data directories are currently empty, if this restore is executed over a currently running cluster it can behave unexpectedly.\nNote: `[--region us-east-1]` is optional, it is to cache the AWS client API's per region.\n\n## Development\n\nTo easily develop locally without the need for docker:\n\n```\ncd ~/into/the/project/directory\nmake clean build/venv\nsource build/venv/bin/activate\ncd src\npython -m cassandras3.main\n```\n\n### Deploy new pip versions\n\nRequires a correctly set up `~/.pypirc`.\n\nTesting:\n```\npython setup.py sdist upload -r pypitest\n```\n\nLive:\n```\npython setup.py sdist upload -r pypi\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeviavir%2Fcassandras3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeviavir%2Fcassandras3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeviavir%2Fcassandras3/lists"}