There are probably several different ways to do this.
One way is to just spin up a new discourse instance every 24 hours and just swap the old ip with the new ip in the reverse proxy config, then delete the old discourse server.
Another way is to save a backup of the database and just re import that version of the db every 24 hours.