mirror of
https://github.com/R0m1k3/Apiflow-gateway.git
synced 2026-10-11 17:27:08 +02:00
feat: Implement a new Dockerized PostgreSQL data synchronization service with cron scheduling.
This commit is contained in:
1 parent
420da6a409
commit
62b7093172
10 files changed
+606
No files matched your search
@@ -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) ==="
|
||||
Reference in new issue
Block a user