Setting Up Local PostgreSQL - Amidst OS and Hardware Concerns reddit / selfhosted ---------------------------------------------------------------------- BlazingBane007 · 2023-11-22 04:16 Worried about Losing Data on my Local Database? Considering a Realtime Database on my Laptop with Cloud Backups for Extra Safety. Need Guidance on Ensuring Reliability Amidst OS or Hardware Concerns. **** ## Thing I'm worried of - Data loss due to OS or hardware failure. - Exceeding clouds free tier quota, as I can't afford to spend money as of now ## what I planned to do - To have a local database on the laptop which will act as a primary database. - Also run the free tier database in the cloud which will act as a backup database. - I don't have to worry about the size of the database as of now. I just have to focus on Cloud database up time. and request response quota. - Still, there is a window open for losing my data in this case. **** ---------------------------------------------------------------------- ElevenNotes · 2023-11-22 06:18 Why not run Postgre as a cluster? Or simply dumb the database every n-interval and save that dump to as many storage endpoints as you can afford and need? Why do you run a production database on your personal device and not on a server? ---------------------------------------------------------------------- BlazingBane007 · 2023-11-22 06:24 Thanks for the suggestion, this isn't a production grade... My application only has like, 10-15 users. I have a cloud cluster and users need to fetch a lot of times. That's the reason i want to maintain a local postgresql server and after let's say a decent amount of records inserted i will save it to the cloud. I wanted to know how others have solved this issue ---------------------------------------------------------------------- ElevenNotes · 2023-11-22 06:32 By running a Postgre cluster. ---------------------------------------------------------------------- Tivin-i · 2023-11-22 15:03 If you are running a Postgresql cluster on a cloud provider you have already transferred the risk of it going down over to them. Backups should still happen and there is dedicated and opensource software for postgrtes to do that such as https://github.com/prodrigestivill/docker-postgres-backup-local