Sign inSign up

itserviceandoperations/alpine-fortigate-backup

By itserviceandoperations

•Updated over 1 year ago

Alpine image with https://github.com/jsahoka/fortigate-backup-api and all dependencies

Image
Networking
0

328

itserviceandoperations/alpine-fortigate-backup repository overview

Minimal alpine image needed to run fortigate-backup-api python scripts.

https://github.com/jsahoka/fortigate-backup-api⁠

Run with compose

version: '3'

services:
  alpine-fortigate-backup:
    container_name: alpine-fortigate-backup
    image: itserviceandoperations/alpine-fortigate-backup:latest
    volumes:
      - ./backups/:/home/fortigate-backup/backups               #Directory on server where backups should be stored
      - ./logs/:/home/fortigate-backup/logs                     #Directory on server where logs should be stored
      - ./fortigates.csv:/home/fortigate-backup/fortigates.csv  #location of fortigates.csv

Fill fortigates.csv

name,ip_1,ip_2,token
Fortigate1,192.168.1.1,,xxxxxxxxxxxxxxxxx
Fortigate2,10.0.0.1:9999,myfortigate.fortiddns.com:9999,yyyyyyyyyyyyyyyyy

Start the container, when booted, the python script will be executed. When the script has exited, the container will stop.

Find the container id

sudo docker container list --all
user@server:~/docker/alpine-fortigate-backup$ sudo docker container ls --all
CONTAINER ID   IMAGE                                                    COMMAND                  CREATED          STATUS                      PORTS                                                                                                NAMES
019ac2a67d0a   itserviceandoperations/alpine-fortigate-backup:test003   "python3 /home/forti…"   19 minutes ago   Exited (0) 17 minutes ago                                                                                                        alpine-fortigate-backup

To run the container once per day at 03:00 add the following to crontab

0 3 * * * docker container start 019ac2a67d0a

Tag summary

Content type

Image

Digest

sha256:f884bc0cb…

Size

27.7 MB

Last updated

over 1 year ago

docker pull itserviceandoperations/alpine-fortigate-backup