mirror of
https://github.com/preparebuddyy/n8n-self-hosted.git
synced 2026-03-02 22:47:01 +00:00
13 lines
317 B
Bash
Executable File
13 lines
317 B
Bash
Executable File
#!/bin/bash
|
|
|
|
date
|
|
|
|
# Exit immediately if a command exits with a non-zero status.
|
|
set -e
|
|
|
|
BACKUP_DIR="local_files/backups"
|
|
mkdir -p "${BACKUP_DIR}"
|
|
|
|
# Dump the PostgreSQL database and compress it.
|
|
docker compose exec -T n8n-psql pg_dump -U n8n -d n8n_db | gzip > "${BACKUP_DIR}/psql_n8ndb_$(date +%F_%H-%M-%S).sql.gz"
|