1 nanahuatl Mar 01, 2013 12:38
3 nanahuatl Mar 03, 2013 15:38
How do you pull the changes made by b2evolution to the files? For instance, b2evo installer creates a basic_config.php file. I can't figure out how to download it and keep after the app rebuilds.
Niltze, sam2kb!
You have two options to modify/download your persistent data via SSH: use scp command and/or login with ssh to your b2evolution instance in the OpenShift platform cloud.
Specifically addressing your question above, OpenShift makes copious use o environment variables so as to allow extensive customization of your application(s) in its platform as a service (PaaS) cloud service.
One of those variables is the $OPENSHIFT_REPO_DIR wich points to app-root/runtime/repo/ your application directory at OpenShift platform. Accordingly, your b2evolution app instance will be located at $OPENSHIFT_REPO_DIR/php/.
Note: in the shell instructions below, please do not include the brackets
[]
only the value inside that is unique to your b2evolution instance on OpenShift.
Thus, if you were to download the file you referenced above, you might want to locally set the remote environment variable:
OPENSHIFT_REPO_DIR=app-root/runtime/repo
export OPENSHIFT_REPO_DIR
Make sure the variable is set ;)
echo $OPENSHIFT_REPO_DIR
...
app-root/runtime/repo
(should print to your screen)
then you copy your remote file into your local current directory thus:
scp yourUniqueAppIdentificatonString@AppName-youUniqueNameSpace.rhcloud.com:$OPENSHIFT_REPO_DIR/php/conf/_basic_config.php .
That's it! But don't forget that the file to download/upload will overwrite the existing one at the local or remote target, thus be careful.
You can also login via SSH to OpenShift cloud:
rhc app ssh [yourB2evoAppName]
Please note that after a successfull b2evolution installation, persistent data shuch as media and cache directories will be moved to app-root/data and a reference (symbolic link) will point to their correct location. This is to prevent an b2evolution upgrade (via a git push) to overwrite the blogger(s) existing data.
And after the first stop of your successfully installed b2evolution (from your command shell)
rhc app stop [yourB2evoAppName]
your b2evolution installation directory will be removed automatically for security considerations and the initial conf/_basic_config.php will also be moved to the persistent app-root/data/conf/_basic_config.php location and a reference (symlink) will also be created from file location where b2evolution expects to find it to point at its new location.
You restart your b2evolution application again thus:
rhc app start [yourB2evoAppName]
Accordingly after a successfull installation and restart of b2evolution on OpenShift, you can save locally the remote persistent data as follows:
Set locally another remote environment variable at your command line:
OPENSHIFT_DATA_DIR=app-root/data
export OPENSHIFT_DATA_DIR
scp -r yourUniqueAppIdentificatonString@AppName-youUniqueNameSpace.rhcloud.com:$OPENSHIFT_DATA_DIR/* .
and the remote persistent b2evolution blogger(s) data (media, cache & conf/_basic_config.php) will be copied to your local current location.
Huelmati!
How do you pull the changes made by b2evolution to the files? For instance, b2evo installer creates a basic_config.php file. I can't figure out how to download it and keep after the app rebuilds.