Zum Hauptinhalt springen
tsecurity.de LIVE
Echtzeit-Radar & Feeds
Alle RSS Feeds
👥 Community & Social
IT NachrichtenRechnungshof: EU nicht genug gegen Cyberangriffe gewappnet(22.09.2026 um 07:42 Uhr)
Android Tipps & SecuritySamsung lässt Besitzer der Galaxy-S26-Smartphones weiter zappeln(22.09.2026 um 07:57 Uhr)
IT NachrichtenRechnungshof: EU nicht genug gegen Cyberangriffe gewappnet(22.09.2026 um 07:42 Uhr)
Android Tipps & SecuritySamsung lässt Besitzer der Galaxy-S26-Smartphones weiter zappeln(22.09.2026 um 07:57 Uhr)
Intelligence View
⚡ tsecurity.de Intelligence

How We Built a 100% Free Automated Data Disaster Recovery System for Our Client

Recently, a client asked us for a way to back up their PostgreSQL databases. While the "standard" advice is often to pay for expensive managed cloud storage, we looked at their actual requirements and realized they didn't need a…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!

Recently, a client asked us for a way to back up their PostgreSQL databases. While the "standard" advice is often to pay for expensive managed cloud storage, we looked at their actual requirements and realized they didn't need a high-priced enterprise solution.



To help them minimize costs, we recommended a custom setup instead of a paid service. We delivered a simple, reliable, and—most importantly—completely free system using Docker, Google Drive, and a handy tool called rclone.









The Goal



The client needed their databases backed up every day, compressed to save space, and stored safely off-site. Because their storage requirements were quite small, paying for an expensive enterprise cloud solution would have been a waste of money.



Instead, we suggested a smarter route: use their existing 15GB of free Google Drive storage as the "vault." It’s secure, reliable, and perfectly sized for their needs.






Step 1: The "Box" (Docker)



We put everything into a Docker container. Think of this as a pre-packaged box that has all the tools needed to talk to the database and Google Drive.



To make it bulletproof on their Windows server, we baked the settings directly into the image to avoid common path errors. For example, here is how a typical Dockerfile for this setup looks:




# Example Dockerfile
FROM alpine:3.18
RUN apk add --no-cache postgresql-client rclone bash ca-certificates
RUN mkdir -p /backups /config
COPY ./config /config
COPY ./scripts/backup-db.sh /scripts/backup-db.sh
RUN chmod +x /scripts/backup-db.sh
CMD ["/bin/bash", "-c", "while true; do /scripts/backup-db.sh; sleep 86400; done"]









Step 2: The "Courier" (Rclone)



To get the files from the server to Google Drive, we used rclone.



The Challenge: We first tried a "Service Account," but Google gives those zero storage space.

The Fix: We switched to a personal OAuth token. This let the system "log in" as the client and use their free 15GB quota.




Important Security Tip for Windows Users:

If you're trying to generate your token and Windows blocks the connection, you may need to temporarily stop the service that "hogs" the network ports. Always remember to turn it back on immediately after to keep your system working correctly.




  1. Stop the service: net stop winnat

  2. Get your token: rclone authorize "drive"

    Login to Google via Rclone]


  3. Start the service back up: net start winnat





Local Login Success





Step 3: Making it Permanent (The "Forever" Fix)



By default, Google tokens expire every 7 days if your Cloud Project is in "Testing" mode. To make sure the backup pipeline never stops, you need to "Publish" your app in the Google Cloud Console.



Simply click "Publish App" on the OAuth consent screen. This ensures your refresh token lasts indefinitely, so the client’s backups keep running month after month without anyone having to log in again.





Step 4: The "Brain" (The Script)



We wrote a simple script that automates the nightly tasks. For example, the core logic of the backup process looks like this:




# Example logic for the backup script:
# 1. Export the data
pg_dump -h db_host -U user -d database --file=backup.dump

# 2. Compress to save space
tar -czf backup.tar.gz backup.dump

# 3. Move to the cloud
rclone --config /config/rclone.conf copy backup.tar.gz gdrive:nordible/db-backups









The "Bonus" Feature: Auto-Cleanup



We didn't just want to upload files; we wanted the system to be truly "set-and-forget." As a bonus for the client, we added a cleanup rule: the script automatically deletes backups older than 5 days from both the server and Google Drive. This ensures they never run out of space and never have to delete files manually.






The Result: A Happy Client



By combining these free tools, we achieved a "set-and-forget" backup system.





  • Cost: $0/month.


  • Maintenance: None.


  • Peace of Mind: Priceless.



Now, every morning, our client can look at their Google Drive and see a fresh backup waiting for them. Simple, effective, and completely free.



Google Drive Backups

Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten How We Built a 100% Free Automated Data Disaster Recovery System for Our Client

Thematisch verwandte Begriffe: Built, Free, Automated, Data · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-61647 | NotebookLM MCP is an MCP server and HTTP service for interacting with Go…
Advisory →
TTS Reader • tsecurity.de Voice
tsecurity.de Icon
tsecurity.de App
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag
Themen-Radar & Intelligence Matrix
Echtzeit-Taxonomie nach Angriffsvektoren & Plattformen

tsecurity.de Live Threat Radar

🔴 LIVE RADAR
MONITORING
AKTIV
CVE-DATENBANK
LIVE
🔍
Community Radar & Live Chat
Sentinel Bot online • Live-Stream
Dein Cluster: Security Explorer
Match:
lädt…
Verbindung zum Community-Stream wird aufgebaut...
Bearbeitungsmodus — Senden überschreibt deine Nachricht
Community-Puls — was gerade passiert
lädt…
Aktivitäten deiner Analysten
lädt…
Neues Thema oder Eilmeldung einreichen

Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.

Heiß diskutierte Einreichungen
🔖 Gespeicherte Artikel
📂 Keine gespeicherten Artikel vorhanden.
Zurück Ziehen Vor
Links: vorheriger Artikel Rechts: nächster Artikel unten: schließen
News NIS-2 Frühwarnung Tier-1 Intel ⏱️ 3 Min vor 10 Min
Artikeldaten werden geladen...

Zurück: vorheriger Vor: nächster
↗ Original-Quelle
Social Reaktionen Deine Reaktion zählt
Einstufung & Relevanz-Poll 0 Stimmen
In sozialen Netzwerken teilen 1-Klick