Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I download my Appfog app's live file system?

Hello I am a Appfog beginner and I want to ask if I upload picture/plugins/themes via the wordpress admin. Because appfog does not currently support a persistent file system, all the plugins/pictes/themes not in the source code will be lost. Is there anyway to backup the current live system and include these files in the source code that I upload? The download source code button or the "af pull" command will only download the last source code I uploaded not changes that where made for example when I install a plugin.

like image 623
XkiD Avatar asked Nov 16 '12 21:11

XkiD


2 Answers

You can add a helper php script to your app like this:

https://gist.github.com/4134750

like image 75
Sea Comet Avatar answered Nov 20 '22 20:11

Sea Comet


You can manually download single files using af files <appname> /app/<filename> but this would be painfull for your purposes.

You would be much better served by setting up your Wordpress installation to run locally using Mamp or Xampp. Pull your app as it is from AppFog, host it locally using Mamp, making your file system changes, then pushing those changes to AppFog.

Here are a few reasons why making changes locally then updating AppFog apps is better:

  • If your running multiple instances of your wordpress app, only one of them will get the installed plugin. Installing the plugin locally and pushing insures all instances get the plugin.
  • Its much faster to develop and test locally and you can see the results of your changes before impacting your live site.
  • Your live production site will not go down if your plugin install fails or somehow makes an unintended change. This is also true for Wordpress updates, do them local then push to production.
  • If your have the changes on your local box you can use version control to track and tag releases before updating production.
  • blue-green deployments become trivial. Have two production apps, a primary and a slave app. Update your code locally then update the slave and test it then promote it to primary by mapping the domain to it. Then you demote the previous primary to slave by unmapping the domain. The slave is always one update older and you can switch back two it if you discover issue with your primary.

Curating your Wordpress apps this way will allow you to take advantage of power the AppFog platform provides.

like image 45
Tim Santeford Avatar answered Nov 20 '22 20:11

Tim Santeford