Download files from Bluemix using Cloud Foundry CLI plugin

I see several questions  in the Bluemix forum about the desire to download files of running applications. Cloud Foundry CLI provides “cf files” command to just to take a look at each file/folder, not entire files. There is easy way to do it. Use Cloud Foundry CLI plugin “cf-download”.

Cloud Foundry CLI v6.7 or higher now provides plugin functionality. See this dev guide . Some of Bluemix users may have already noticed new command “cf install-plugin”. This enables to add features to existing commands.

% cf install-plugin -help
install-plugin - Install the plugin defined in command argument

cf install-plugin URL or LOCAL-PATH/TO/PLUGIN [-r REPO_NAME]

The command will download the plugin binary from repository if '-r' is provided

cf install-plugin
cf install-plugin ~/Downloads/plugin-foobar
cf install-plugin plugin-echo -r My-Repo

-r   repo name where the plugin binary is located

Cloud Foundry Foundation provides community base plugins at There are plugin such as:

  • autopilot : zero downtime deploy plugin for cf applications. This is useful to switch to new application without worry about stopping and deleting old application.
  • Targets : Can be used to change the target (e.g. to Bluemix US , to Bluemix London, or to the other Cloud Foundry base PaaS provider such as Cloudn PaaS from NTT ).
  • etc, etc.

Most of plugins are quite useful. Anyway, go back to “cf-download”. To add the plugin is very easy. Add plugin repository, and then install the plugins.

% cf add-plugin-repo CF-Community
OK added as 'CF-Community'

% cf install-plugin cf-download -r CF-Community
Looking up 'cf-download' from repository 'CF-Community'
8637440 bytes downloaded...
Installing plugin <path>...
Plugin cf-download v1.0.0 successfully installed.

% cf plugins
Listing Installed Plugins...
Plugin Name   Version   Command Name   Command Help
cf-download   1.0.0     download       Download contents of a running app's file directory

Now, I login to Bluemix, and then tried to download files (Nodered boilerplate in my case).

% cf download # just to see syntax.

Error: Missing App Name
   download - Download contents of a running app's file directory

   cf download APP_NAME [PATH] [--overwrite] [--verbose] [--omit ommited_paths] [-i instance_num]

% cf download mynoderedapp .

It took several minutes to download all files. After the command completes, I can see enter files. To check if the files are identical. I took a look at file.

$ cat


$ cf files mynoderedapp ./
Getting files for app ...


Looks like they are identical.  It is so easy to download files from Bluemix application now. 🙂

This entry was posted in Bluemix. Bookmark the permalink.

6 Responses to Download files from Bluemix using Cloud Foundry CLI plugin

  1. Miguel C says:

    Thanks for using the cf-download plugin, I wrote a blog article with more information about advanced usage, implementation, and limitations of this plugin. check it out here:

  2. Pingback: Bluemix 에 push 했던 파일 다시 다운받기 | Bluemix

  3. Pingback: Bluemix 에 push 했던 파일 다시 다운받기 | IBM Cloud Tech Forum – Korea

  4. Letha Silver says:

    I have to express my gratitude for your generosity in support of people that should have help with this important issue. Your real commitment to getting the message around became rather advantageous and has consistently empowered regular people much like me to achieve their dreams. The informative tutorial means so much a person like me and even more to my office colleagues. Best wishes; from all of us.

  5. itay says:

    Thank you very much,
    one problem i did experience though, it downloads binary files that is recognized as folders (Windows)

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s