-
Notifications
You must be signed in to change notification settings - Fork 14
/
run.sh
executable file
·42 lines (40 loc) · 1.69 KB
/
run.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
# *********************************************************************
# ___ ___ ___ ___ ___
# / __| /_\ \ / /_\ / __| __|
# \__ \/ _ \ V / _ \ (_ | _|
# |___/_/_\_\_/_/_\_\___|___| ___ ___ ___
# / __|/ _ \| __|_ _\ \ / /_\ | _ \ __|
# \__ \ (_) | _| | | \ \/\/ / _ \| / _|
# |___/\___/|_| |_| \_/\_/_/ \_\_|_\___|
#
# -------------------------------------------------------------------
# PORTAINER-BACKUP
# https://github.com/SavageSoftware/portainer-backup
# -------------------------------------------------------------------
#
# This script executes a backup of portainer data using the
# 'portainer-backup' Docker container image.
#
# *********************************************************************
# COPYRIGHT SAVAGESOFTWARE,LLC, @ 2022, ALL RIGHTS RESERVED
# *********************************************************************
docker run -it --rm \
--name portainer-backup \
--volume $PWD/backup:/backup \
--env TZ="America/New_York" \
--env PORTAINER_BACKUP_URL="http://portainer:9000" \
--env PORTAINER_BACKUP_TOKEN="YOUR_PORTAINER_ACCESS_TOKEN_GOES_HERE" \
--env PORTAINER_BACKUP_PASSWORD="" \
--env PORTAINER_BACKUP_OVERWRITE=true \
--env PORTAINER_BACKUP_SCHEDULE="0 0 0 * * *" \
savagesoftware/portainer-backup:latest $@
# ------------------------
# OPTIONAL ENV VARIABLES
# ------------------------
# --env PORTAINER_BACKUP_STACKS=true
# --env PORTAINER_BACKUP_DRYRUN=true
# --env PORTAINER_BACKUP_CONCISE=true
# --env PORTAINER_BACKUP_DIRECTORY=/backup
# --env PORTAINER_BACKUP_FILENAME=portainer-backup.tar.gz
# --env FORCE_COLOR=0