Self hosting production compose changes and backup

  1. Recently the self hosting area changed: reflex/docker-example at main · reflex-dev/reflex · GitHub

Is the production-compose still the same as the production setup before or should I change my deployment (using the old one) to the new way to deploy?

  1. When storing data in the inbuilt database using the compose setup, all the database data is stored in the postgres db right?

What would be an easy way to backup this database (without using simply supabase) in case I delete everything by accident or the server fails?

You can create a server snapshot to rollback if the update to the new self hosting plan fails.

I will try it out later today tho since i have the same question.

1 Like

Hey did you try out the server snapshot?
In that case, is it actually better to do a server backup or a server snapshot?

Hi, sorry for the extremly late reply, u fully forgot about that.

Yes i have tried out using snapshots and it worked perfectly fine. Of course when making a snapshot you should ensure your reflex app has stopped so you wont get any problems with caching. If you dont want to stop your reflex app you could snapshot memory too but what i have learnt is not to do that.

Backup is still needed 100% if you are using databases, in that case i would ONLY backup the databse and make a snapshot of the server where the app is running on. Backups could make your storage pretty full after some time, wont happen that fast with snapshots.

I recommend you using Hetzner for testing purposes, they are extremly cheap. (5$/ month)

There you can test if snapshots will work for you reflex application but there is no reason which comes into my mind why it wouldn’t.