Configuration backup/restore and duplication

alt=
DannyA
@dannya
9 years ago
584 posts
In light of some recent issues I was thinking of a couple of things that I would like to do and wanted to see if it's something you guys could provide some guidance on.

1. It would be great if we could have a script we could execute from acp that would allow us to back up the entire configuration of all the modules. There would also be a restore button so that if we did a fresh install, the previous configuration of all the modules would instantly be loaded.

2. When deploying a new server, I would like to have configuration file that configured all the modules. Ideally, you would just change the variable settings ,such as server name, in the config file. This would allow for fast deployment of servers for scalability purposes. For example, if i wanted to create an AWS autoscale group of conversion servers, I could create an AMI with the lamp stack, the jr files, and a config file with variable server names for each instance. (yes I would still have to register each instance with the queue server).
This is how all major media platforms manage their variable scaling needs. However currently, configuring a server to just handle conversions is too time consuming to do manually. We need to be able to do dynamically with a config file. I'm sure it could be done today, but not sure how.
updated by @dannya: 02/15/16 12:57:11AM
michael
@michael
9 years ago
7,715 posts
Idea (not sure how practical it is): create a server setup the way you want it with the settings how you want them, then save the whole server image. When want to create a new server, instead of creating a normal server then installing jamroom. deploy the image with jamroom already installed.
brian
@brian
9 years ago
10,148 posts
For this the best solution is probably a small shell script that dumps the jr_jrcore_settings table - i.e.

mysqldump --user='$USER' --password='$PASSWORD' --lock-tables=false --single-transaction --extended-insert --add-drop-table --quick $DB_NAME jr_jrcore_settings > settings.sql

This will create a "settings.sql" file that you can edit and change the name of the server, then dump it into a new JR install:

mysql --user='$USER' --password='$PASSWORD' $DB_NAME < settings.sql

Have something like that be part of your build script should work well - and you can do that to any other table to want as well.

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
alt=
DannyA
@dannya
9 years ago
584 posts
hmm. ok. let me try that.

Tags