Automate the backup of configurations from a FRITZ!Box router using 1Password for secrets
892
fritzbox-backup Docker ImageThis Docker image, fritzbox-backup, is designed to automate the backup of configurations from a FRITZ!Box router. The image leverages 1Password to load necessary secrets and is built using Nix with a flake.nix configuration.
You can run the Docker container with the following command:
docker run --rm -ti -v ./token:/etc/token:ro -v ./backup/:/mnt/backup:rw rcouto/fritzbox-backup-docker
-v ./token:/etc/token:ro: Mounts the local ./token file containing your 1Password Service Account token to /etc/token inside the container as read-only.
-v ./backup/:/mnt/backup:rw: Mounts the local ./backup/ directory to /mnt/backup inside the container with read-write permissions. The backups from the FRITZ!Box will be saved here.
The Docker image may use environment variables to configure various aspects of the backup process. You can customize these by passing them to the docker run command using the -e flag.
FRITZ_BASE_URL: Base URL of the FRITZ!Box router (default https://fritz.box)OP_TOKEN_FILE: Path to the token file inside the container (default /etc/token)OP_BKP_USR_URL: Secret reference for FRITZ!Box user (default "op://homelab-scripts/Fritzbox - backup/username")OP_BKP_PWD_URL: Secret reference for FRITZ!Box password (default "op://homelab-scripts/Fritzbox - backup/password")OP_BKP_FIL_URL: Secret reference for FRITZ!Box backup file password (default "op://homelab-scripts/Fritzbox - backup/backup-file-password")OP_BKP_OTP_URL: Secret reference for FRITZ!Box OTP (default "op://homelab-scripts/Fritzbox - backup/one-time password?attribute=otp")BACKUP_DIR: Path to the directory inside the container where backups will be saved (default /mnt/backup)fritzbox-bkp-$(date +"%Y%m%d%H%M%S").export (e.g. fritzbox-bkp-20240817101506.export)Content type
Image
Digest
sha256:8864fefc1…
Size
31.5 MB
Last updated
about 2 years ago
docker pull rcouto/fritzbox-backup-docker