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.

Related posts

Leave a Reply

3 comments

  1. 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.

  2. I found this script “zipit” even better than the “ls” script Sea Comet provided. This will zip up the entire live app directory and then you download it. This way, you can make changes via the wordpress admin, get it all working the way you want it, then use zipit, unzip the file and push it to your app on appfog and the state is totally saved across restarts.

    https://github.com/zeroecco/zipit/blob/master/zipit.php

    You can find more info in this blog post over on the old PhpFog blog:
    http://blog.phpfog.com/2012/11/16/how-to-download-your-entire-application-not-just-code-from-php-fog/