This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Forked from: https://gist.github.com/Nitrousoxide/43ed81840c542965b76c08c60b69b1da | |
# Get a list of all volumes | |
volumes=$(podman volume ls -q) | |
#get timestamp for unique filename | |
timestamp=$(date +"%Y%m%d%H%M%S") | |
# Pause all running containers | |
echo "Pausing containers for backup" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
from sys import stdout | |
# Define logger | |
logger = logging.getLogger('mylogger') | |
logger.setLevel(logging.DEBUG) # set logger level | |
logFormatter = logging.Formatter\ | |
("%(name)-12s %(asctime)s %(levelname)-8s %(filename)s:%(funcName)s %(message)s") | |
consoleHandler = logging.StreamHandler(stdout) #set streamhandler to stdout |