#!/bin/bash set -eu -o pipefail HOSTNAME=$(hostname) CONTAINER_NAME="borgmatic" HISTFILE=./data/.bash_history SOURCE_DIR=./data/source touch ${HISTFILE} sudo mount --bind /home/ ${SOURCE_DIR}/home # Some of those volumes seem useless, e.g. : # * the repository (which can be mounted within the container) # * mounting the data to save on a precise mount point (one could have several..) podman run \ -h ${HOSTNAME} \ --replace \ --detach \ --name ${CONTAINER_NAME} \ -v ${SOURCE_DIR}:/mnt/source:ro \ -v ./data/borgmatic.d:/etc/borgmatic.d/ \ -v /home/theenglishway/.ssh:/root/.ssh \ -v ${HISTFILE}:/root/.bash_history \ -v borg_config:/root/.config/borg \ -v borg_cache:/root/.cache/borg \ -v borgmatic_state:/root/.local/state/borgmatic \ -e TZ=Europe/Paris \ ghcr.io/borgmatic-collective/borgmatic