1

I have a php bluemix application created out of boilerplates.This app accepts files uploaded by user for processing.Can you please help me with below questions 1. How can I view/modify/download project files/user uploaded files on bluemix? 2. When ever I push any changes to cloud.The folder on my system replaces the entire folder along with project files and user uploaded files in bluemix.What is the mechanism we have to backup the files before pushing changes or make sure the folder with files do not get replaced when we push changes. 3. Can we connect any ftp client like filezilla so that I can view,upload and take backup of required fields. Thanks in advance for your help.

1 Answers1

1

When a cloud foundry app is restarted or updated, the droplet is destroyed and recreated with the new code, so everything that was added on execution time are lost.

If your app need to have information updated at execution time, then i can imagine three possible solutions:

1- Using a cloud storage, like the Cloud Object Storage as a repository for those files. The COS work in a similar way to the Amazon S3. You can see more about it here

2- Change the solution to use containers, that way if you restart or upload something new, you don't lose what was created on execution time. You can create a persistent volume to make sure nothing will be lost even if the container is destroyed.

3- This option isn't on execution time, but if there are few alterations, can be a option. You can make all alterations on a git repository, instead of upload on the app. Then restating the app with the new modifications.

About connecting with the cloud foundry app with a sftp.

The first step is to get the guid from your app

cf app myapp --guid

a8e2d87f-3f1e-4ef5-80cd-342s1ae37a79

After that, you need to get the app_ssh_endpoint, you can do that using

“cf curl /v2/info”

Also take note of the app_ssh_host_key_fingerprint.

The next step is to generate an ssh-code, to connect to a cf app using another client.

cf ssh-code

2tR9FgnrLE

sftp oPort=2222 “cf:guid/instancia”@app_ssh_endpoint

ex:

sftp -oPort=2222 "cf:a8e2d87f-3f1e-4ef5-80cd-342s1ae37a79/0"@ssh.ng.bluemix.net

This link below can give more information if needed.

Felipe Paixao
  • 411
  • 3
  • 7
  • Hi Felipe,thanks for your reply.The first and second option you mentioned seem do-able.But I have some questions.Can you help me with some sample php code to connect my app with IBM cloud object storage,you can may be refer me to some link which can be helpful.I may have to rule out container part as my project is very big and would be difficult to migrate to container now.One more issue is that I see that my cf app is not able to sync to either GIT or Orion eclipse.If you could help me here as well than would be great.Thanks in advance for your support – Mohan Krishna V Apr 09 '18 at 14:27