RSYNC-ing vanilla from xampp to host - Am I missing anything?
I would like to be able to make changes on xampp then rsync my changes to the actual host. So my xampp becomes my master copy and when I am comfortable with changes I simply rsync them to the host and the site is updated (and of course the database is unchanged on the host).
As far as I can tell I will need to exclude *.ini cache files from being copied from xampp to host, and make the config.php the same on both systems. Anything else I should NOT be copying to the host??
I have made it such that I have the same dbName, dbUser, dbPass on both xampp and the host. Then I diff-ed the two config.php files and have questions about the following config params:
$Configuration['Garden']['Cookie']['Salt'] =... $Configuration['Garden']['InstallationID'] =... $Configuration['Garden']['InstallationSecret']=...
I assume salt is part of the password generation/checking, so I'll simply copy the salt from the host to xampp and copy the admin passwd from the host-mysql_phpmyadmin to xampp-mysql_phpmyadmin in the appropriate table.
The installationID and installationSecret did not exist in my xampp install for unknown reasons. Can anyone shed any light on what these are used for? For now I've copied them to my xampp config and it seems to be working.
Thanks!
Best Answer
-
Linc Admin
I would just do /cache/* since there's no reason to sync anything from that directory.
FYI /uploads/. is redundant if you've already done /uploads/*
That should cover it.
5
Answers
I really don't recommend doing that with the config. You are going to burn yourself, bad. Keep them separate.
@Lincoln,
Thanks for responding.
Ultimately what I would like to do is ensure that anything I configure in the admin dashboard (with the exception of database changes) in xampp is propagated to the the host. Mainly this is for turning on/off plugins and applicatons (in fact, that may be the entire list I am concerned about). So for example if I turn on a plugin in xampp I know that after I rsync it will be turned on in the host. I want xampp to be the master as much as is possible.
So is there another way that I can override the config file? So in this new methodology I would not rsync the config file (it would be excluded) and I would configure things manually (text edit instead of admin dashboard) in this override-file. I would do this first in xampp to override values in the config file to turn features on and off and test them. Then when I rsync, since the override-file is not excluded, the override values would be the same on the host and it would operate in the same way as the master development version (xampp).
So in the new method it is a small contained list of overrides instead of impacting the entire config file.
I'm not averse to editing the php that pulls in the config file if you can point that out and adding a require/include of overrides.php (I can deal with propagating that change to 2.1 when that happens).
Thanks.
If you turn on a plugin or application that makes database changes (many do) and then rsync that to your live site, your site will instantly crash with a fatal error.
You cannot sync config files. You need to enable plugins and apps manually on your live site.
@Lincoln
All right. I thought the config file showing the application as turned on would in effect install any database changes that would occur when you click install in the admin dashboard. So there is added code that only happens via the admin panel click that I would be missing with my method. Fine. (Bummer).
As to my other question:
Would this be a complete list of excludes:
/conf/config.php /cache/*.ini /uploads/* /uploads/*.*
Thanks again.
probably ../compile as well. You probably would need to run /utility/update on upgrades too.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
@peregrine
Thanks,
I'm guessing you meant:
yep.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
@Peregrine, Thanks
@Lincoln, Any others?
I would just do /cache/* since there's no reason to sync anything from that directory.
FYI /uploads/. is redundant if you've already done /uploads/*
That should cover it.
@Lincoln
Thanks very much.
For others interested:
Note that I use the --delete option which means (with the exception of the excluded files above) if the file/dir doesn't exist in xampp, it will be deleted from the host. So experiment first before doing this on a live site. Also note that this doesn't impact the mysql database so all of the discussions on your site will remain intact.