mirror of
https://github.com/MatthewL246/pretendo-docker.git
synced 2026-04-18 14:47:20 -05:00
Make backups error if the backup directory already exists
This commit is contained in:
parent
e7953be311
commit
4a4643b1d8
|
|
@ -11,9 +11,10 @@ if [ -z "$backup_name" ]; then
|
|||
fi
|
||||
|
||||
backup_dir="$git_base/backups/$backup_name"
|
||||
if [ ! -d "$backup_dir" ]; then
|
||||
mkdir -p "$backup_dir"
|
||||
if [ -d "$backup_dir" ]; then
|
||||
error "Backup directory $backup_dir already exists."
|
||||
fi
|
||||
mkdir -p "$backup_dir"
|
||||
info "Backing up to $backup_dir"
|
||||
|
||||
docker compose up -d mitmproxy-pretendo mongodb postgres minio redis
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user