https://github.com/brejoc/lxc-duply-backup
Example config and scripts to perform a clean backup of Linux Containers. Therefore the containers are stopped right before the backup and started right after the backup.
https://github.com/brejoc/lxc-duply-backup
backup duplicity duply linux-containers lxc lxc-containers python
Last synced: about 1 year ago
JSON representation
Example config and scripts to perform a clean backup of Linux Containers. Therefore the containers are stopped right before the backup and started right after the backup.
- Host: GitHub
- URL: https://github.com/brejoc/lxc-duply-backup
- Owner: brejoc
- License: unlicense
- Created: 2014-12-31T18:31:05.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2016-10-13T09:08:57.000Z (almost 10 years ago)
- Last Synced: 2023-06-28T12:53:12.949Z (about 3 years ago)
- Topics: backup, duplicity, duply, linux-containers, lxc, lxc-containers, python
- Language: Python
- Homepage: http://brejoc.com/lxc_backup_with_duply/
- Size: 14.6 KB
- Stars: 10
- Watchers: 5
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# lxc-duply-backup
With lxc-duply-backup you can generate Deb or RPM packages that automatically backup Linux Containers. It makes use of [duply](http://www.duply.net/) and cron jobs.
The origins of lxc-duply-backup can be found in my [blog post](http://brejoc.com/lxc_backup_with_duply/).
**Attention**:
Containers are stopped before the backup and started right after the backup to make sure the backups are clean. Otherwise data might still be in memory and not on disk.
# Dependencies (for building packages)
* [invoke](https://github.com/pyinvoke/invoke)
* [fpm](https://github.com/jordansissel/fpm/wiki)
* [PyYAML](http://pyyaml.org/)
* [sh](https://github.com/amoffat/sh)
* [Jinja2](http://jinja.pocoo.org/)
Or take a look at [basalt](https://github.com/basalt/basalt).
# Dependencies (for the package itself)
* [duply](http://duply.net/)
* [LXC](https://linuxcontainers.org/)
Debian/Ubuntu: `apt-get install lxc duply`
# Usage
1. Create your own [config](https://github.com/brejoc/lxc-duply-backup/blob/master/configs/invoices_example.yaml). Most likely you want to change the [package name](https://github.com/brejoc/lxc-duply-backup/blob/master/configs/invoices_example.yaml#L1), the paths to the [config files](https://github.com/brejoc/lxc-duply-backup/blob/master/configs/invoices_example.yaml#L7) (with the container name), the [config path](https://github.com/brejoc/lxc-duply-backup/blob/master/configs/invoices_example.yaml#L25) and [container name](https://github.com/brejoc/lxc-duply-backup/blob/master/configs/invoices_example.yaml#L26).
2. And build the package: `invoke build_deb --config configs/my_new_config.yaml`
# License
[Public Domain](https://github.com/brejoc/lxc-duply-backup/blob/master/LICENSE)