Use 'bullseye-slim' image for volume backup

This is more likely to be available when these services are called, and
does not need to be pulled opportunistically.
This commit is contained in:
Alex Palaistras 2021-09-18 19:48:56 +01:00
parent 377ad0e89b
commit 16ddc3ab79
2 changed files with 2 additions and 2 deletions

View File

@ -8,7 +8,7 @@ ExecStartPre=/bin/install --mode 0700 --directory %S/backups/coreos-home-server/
ExecStart=/bin/podman run --replace --rm --name %p-%i --entrypoint /bin/bash \ ExecStart=/bin/podman run --replace --rm --name %p-%i --entrypoint /bin/bash \
--volume %i:/data:z,ro \ --volume %i:/data:z,ro \
--volume %S/backups/coreos-home-server/%i:/backups:z \ --volume %S/backups/coreos-home-server/%i:/backups:z \
docker.io/debian:stable-slim \ docker.io/debian:bullseye-slim \
-c 'env name="%i-$(date +%%w%%H)" \ -c 'env name="%i-$(date +%%w%%H)" \
tar -cvpzf "/backups/${name}.tar.gz" -C /data . && \ tar -cvpzf "/backups/${name}.tar.gz" -C /data . && \
ln --force "/backups/${name}.tar.gz" /backups/%i-latest.tar.gz' ln --force "/backups/${name}.tar.gz" /backups/%i-latest.tar.gz'

View File

@ -7,7 +7,7 @@ Type=oneshot
SyslogIdentifier=%N SyslogIdentifier=%N
ExecStart=/bin/podman run --replace --rm --name %p-%i --volume %i:/data:z --entrypoint /bin/bash \ ExecStart=/bin/podman run --replace --rm --name %p-%i --volume %i:/data:z --entrypoint /bin/bash \
--volume %S/backups/coreos-home-server/%i:/backups:z,ro \ --volume %S/backups/coreos-home-server/%i:/backups:z,ro \
docker.io/debian:stable-slim \ docker.io/debian:bullseye-slim \
-c 'test -n "$(ls -A /data)" && echo "Volume %i is not empty, skipping." && exit 0; \ -c 'test -n "$(ls -A /data)" && echo "Volume %i is not empty, skipping." && exit 0; \
tar -xvpf "/backups/%i-latest.tar.gz" -C /data' tar -xvpf "/backups/%i-latest.tar.gz" -C /data'