coreos-home-server/config/common/container.bu
Alex Palaistras 41328342b3 Implement basic volume backup and restore mechanism
This commit implements three new services, specifically:

  - The `container-volume` service, which applies to a specific volume
    name and ensures this exists. This is mainly useful as a dependency
    to other services, as Podman will create named volumes itself if
    needed.

  - The `container-volume-backup` service, which creates a `tar.gz`
    snapshot of the given volume's contents in `/var/lib/backups`.

  - The `container-volume-restore` service, which populates an empty
    volume from a pre-existing file in `/var/lib/backups`, presumably
    created by `container-volume-backup`.

These are then be used to automatically create volume snapshots every 12
hours, rolling over every 7 days.
2021-08-14 22:38:17 +01:00

30 lines
737 B
Plaintext

variant: fcos
version: 1.3.0
storage:
trees:
- path: /etc/coreos-home-server
local: service/
- path: /etc/systemd/system
local: common/systemd/
directories:
- path: /etc/coreos-home-server
mode: 0700
systemd:
units:
- name: container-build@.service
enabled: true
- name: container-build@.path
enabled: true
- name: container-network@.service
enabled: true
- name: container-environment@.service
enabled: true
- name: container-volume@.service
enabled: true
- name: container-volume-backup@.service
enabled: true
- name: container-volume-backup@.timer
enabled: true
- name: container-volume-restore@.service
enabled: true