Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sensson/python-openstack-backup
A simple set of CLI tools to create and restore snapshots/backups on OpenStack
https://github.com/sensson/python-openstack-backup
fuga openstack openstack-sdk python3
Last synced: about 2 months ago
JSON representation
A simple set of CLI tools to create and restore snapshots/backups on OpenStack
- Host: GitHub
- URL: https://github.com/sensson/python-openstack-backup
- Owner: sensson
- Created: 2018-11-03T14:36:49.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-02-08T00:44:13.000Z (almost 2 years ago)
- Last Synced: 2024-09-28T00:42:50.729Z (3 months ago)
- Topics: fuga, openstack, openstack-sdk, python3
- Language: Python
- Homepage:
- Size: 19.5 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# OpenStack CLI backup tools
This repository contains a few useful tools to manage your instances on
OpenStack. It was written to support our backup needs in an environment
created to run volatile services.WARNING: we use snapshots as a way to create crash consistent backups. These
backups may not include all data. Any data not `sync`'d to disk may be lost.Read more about [crash consistent vs. application consistent](https://searchdatabackup.techtarget.com/answer/Crash-consistent-vs-application-consistent-backups-of-virtual-machines).
# Installation
Configure your OpenStack cloud(s). The example and default is based on [Fuga](https://fuga.cloud/).
- Copy `clouds.yaml.example` to `clouds.yaml` and fill in your details.
- Copy `secure.yaml.example` to `secure.yaml` and fill in your password.We suggest you run this from a virtualenv.
```
virtualenv -p python3 env
. env/bin/activate
pip install -r requirements.txt
```# Backup
```
./snapshot.py
```This takes two optional arguments:
- `--include` can be used to specify servers that you want to include. Specify
multiple times to include more servers.
- `--exclude` can be used to exclude servers from making snapshots. Specify
multiple times to exclude more servers.It will create a snapshot of all servers by default.
# Restore
```
openstack volume snapshot list
./restore.py --snapshot --volume
```# Limitations
These scripts were written using Python 3.6. Other versions may work but are
untested.# Tests
Sorry, this code doesn't come with tests yet.