39 lines
921 B
Bash
39 lines
921 B
Bash
#!/bin/bash
|
|
|
|
# -- Docker Maintenance Script Variables
|
|
# -- Written by: Robert Partridge (https://fosstodon.org/@techaddressed)
|
|
# -- Project URL: https://gitea.techaddressed.com/robert/docker-maintenance/
|
|
# -- License: MIT License (https://choosealicense.com/licenses/mit/)
|
|
|
|
|
|
# bypass root permission check (true/false)
|
|
|
|
bypassRoot=false
|
|
|
|
# docker container location
|
|
|
|
containerLocation="/path/to/your/docker/directory"
|
|
|
|
# backup storage location
|
|
|
|
backupLocation="/path/to/your/docker/backup"
|
|
|
|
# log file location
|
|
|
|
logLocation="/var/log/docker-maintenance"
|
|
|
|
# retain this many backups (specify 0 to keep all backups)
|
|
|
|
keepBackups=0
|
|
|
|
# backup method (choose either "files" or "snapshot")
|
|
|
|
backupMethod="snapshot"
|
|
|
|
# container sub-directory array
|
|
|
|
containerDirs=("container1" "container2" "container3" "container4")
|
|
|
|
# container names array
|
|
|
|
containerNames=("container1" "container" "container3" "container4") |