Use podman

This commit is contained in:
Jeffrey Serio 2025-01-27 14:10:49 -06:00
parent 8ffe19dfd1
commit 64431087e6
2 changed files with 23 additions and 29 deletions

View File

@ -1,29 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
if ! test -f /usr/local/bin/vackup; then
echo "You need the vackup script from https://github.com/BretFisher/docker-vackup"
exit 1
fi
BACKUP_DIR="${HOME}/docker_volume_backups"
DATE=$(date '+%Y-%m-%d_%H%M%S')
KEEP=7
volumes=(
"freshrss_data"
"freshrss_db"
"freshrss_extensions"
"qbittorrent-docker_qbittorrent-config"
"shaarli_shaarli-cache"
"shaarli_shaarli-data"
)
for vol in "${volumes[@]}"; do
/usr/local/bin/vackup export "$vol" "${BACKUP_DIR}/${vol}-${DATE}.tar.gz"
done
find "$BACKUP_DIR" -maxdepth 1 -mtime +"$KEEP" -type f -delete
exit 0

23
shell/backup_podman_volumes Executable file
View File

@ -0,0 +1,23 @@
#!/usr/bin/env bash
set -euo pipefail
BACKUP_DIR="${HOME}/podman_volume_backups"
DATE=$(date '+%Y-%m-%d_%H%M%S')
volumes=(
"freshrss_data"
"freshrss_db"
"freshrss_extensions"
"shaarli_shaarli-cache"
"shaarli_shaarli-data"
)
for vol in "${volumes[@]}"; do
podman volume export "$vol" --output "${BACKUP_DIR}/${vol}-${DATE}.tar"
gzip "${BACKUP_DIR}/${vol}-${DATE}.tar"
done
find "$BACKUP_DIR" -maxdepth 1 -mtime +3 -type f -delete
exit 0