feat: Implement a new Dockerized PostgreSQL data synchronization service with cron scheduling.

This commit is contained in:
Michael committed 2026-03-20 07:31:55 +01:00
1 parent 420da6a409
commit 62b7093172
10 files changed
+606

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
#!/bin/sh
# Sync PostgreSQL Debian → PostgreSQL Hostinger
# Source : frps:15432 (tunnel frp vers postgres Debian)
# Destination : postgres_db (container existant sur Hostinger)
set -e
echo "=== SYNC START $(date) ==="
PGPASSWORD=$SRC_PASS pg_dump \
-h "$SRC_HOST" -p "$SRC_PORT" \
-U "$SRC_USER" -d "$SRC_DB" \
--data-only --if-exists --clean \
--no-acl --no-owner \
| PGPASSWORD=$DST_PASS psql \
-h "$DST_HOST" -p "$DST_PORT" \
-U "$DST_USER" -d "$DST_DB" \
--set ON_ERROR_STOP=0
echo "=== SYNC DONE $(date) ==="