Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/znerol/python-podman-dump
A python script and a systemd unit simplifying data backups from podman containers
https://github.com/znerol/python-podman-dump
backup podman systemd
Last synced: 25 days ago
JSON representation
A python script and a systemd unit simplifying data backups from podman containers
- Host: GitHub
- URL: https://github.com/znerol/python-podman-dump
- Owner: znerol
- License: gpl-3.0
- Created: 2022-01-24T14:47:19.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-08-03T10:42:43.000Z (over 1 year ago)
- Last Synced: 2024-04-16T00:33:52.192Z (7 months ago)
- Topics: backup, podman, systemd
- Language: Python
- Homepage: https://podman-dump.readthedocs.org
- Size: 32.2 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: COPYING
Awesome Lists containing this project
README
podman-dump
===========A python script and a systemd unit simplifying data backups from podman
containers.Dependencies
------------Podman-dump requires `podman` und `Python >= 3.6`.
Note that `conmon` version < 2.0.26 is affected by containers/conmon#236.
Unfortunately, this bug affects `conmon` shipped in
[Debian 11 (Bullseye)][conmon bullseye] as well as
[Ubuntu 22.04 (Jammy Jellyfish][conmon jammy]).Use the `--conmon` flag of `podman-dump` to specify a more recent `conmon`
version to be used during dumps.[conmon bullseye]: https://packages.debian.org/bullseye/conmon
[conmon jammy]: https://packages.ubuntu.com/jammy/conmonInstall
-------Navigate to the releases page and pick the latest `podman-dump-dist.tar.gz`
tarball. Copy it to the target machine and unpack it there.$ scp dist/podman-dump-dist.tar.gz [email protected]:~
$ ssh [email protected] sudo tar -C /usr/local -xzf ~/podman-dump-dist.tar.gzBuild
-----*Preferred method*: Build a distribution tarball, copy it to the target machine
and unpack it there.$ make dist
$ scp dist/podman-dump-dist.tar.gz [email protected]:~
$ ssh [email protected] sudo tar -C /usr/local -xzf ~:podman-dump-dist.tar.gz*Alternative method*: Check out this repository on the traget machine and
install it directly. The destination directory can be changed with the `prefix`
variable in order to change the installation prefix to something else than
`/usr/local`.$ make all
$ sudo make prefix=/opt/local install[Sphinx] is necessary in order to build the man pages and the users guide. This
step can be skipped by using the `install-bin` target.[Sphinx]: https://www.sphinx-doc.org/
Annotations
-----------Annotate containers with the `ch.znerol.podman-dump` label in order to
configure them for periodic backups. See the `podman-dump(1)` manpage for
detailed information.Systemd timers
--------------Enable `[email protected]` with an instance name matching one of the interval
shorthands supported by `systemd.time(7)`. E.g., in order to enable the weekly
schedule in the systemd `system` scope, run the following command:```
systemctl enable --now [email protected]
```Refer to `[email protected](8)` manpage for detailed information.
Usage
-----```
usage: podman-dump [-h] [-p] [-v] dumpdir schedule
usage: podman-dump [-h] [-p] [-v] [--podman PODMAN] [--conmon CONMON] dumpdir schedulepositional arguments:
dumpdir The destination directory for container dumps
schedule Name of the schedule to runoptional arguments:
-h, --help show this help message and exit
-p, --prune Prune old backups after dumping a container
-v, --verbose Turn on verbose logging
--podman PODMAN Path of the podman binary
--conmon CONMON Path of the conmon binary```
License
-------* [GPL-3 or later](https://www.gnu.org/licenses/gpl-3.0.en.html)