We currently have an application running on a dedicated server which utilizes a LEMP (Linux, Nginx, MariaDB, PHP) stack. Right now we are only doing backups at a set interval (every x hours). I have been researching how we should go about having a live backup and was curious what other people were doing?
Currently our idea is to have another server in a different geographic location which has mariadb installed, then sync the databases creating a live read-only copy of our production database on this backup server. For files uploaded by users we would setup rsync to sync to the backup server when changes are made to the uploads directory on the production server. Does this sound like a solid plan?
Also, the thought has crossed our minds that if we are going to be paying for an additional dedicated server, that we should run the application from both servers, configuring DNS to round robin between the two. This would not only provide us with a backup, but also provide us with fault tolerance in the event one of the servers goes down.
Are we on the right track or have we missed some vital element?