0
  1. I have created a cloud foundry app to deploy node js application in bluemix.
  2. I have used the commands which they given in Getting Started, to deploy my node js application from local to bluemix. Application is deployed successfully and app starts running.
  3. Now I have to download the code (the entire project folder) I have deployed, how can I do this?
jonrsharpe
  • 115,751
  • 26
  • 228
  • 437
  • Why would you want to? How did you deploy it in the first place if you don't have the code? This seems totally backwards. – jonrsharpe Aug 29 '17 at 10:02
  • In my application user can upload the files, That files will store in my application folder thats why i need to download before i re-deploy the application again.If i deploy without taking backup of files uploaded,it gets erased – user7369339 Aug 29 '17 at 10:43
  • 1
    That is in itself a problem, because the storage in CF isn't persistent - if your app falls over and gets restarted by the platform, all of the files already uploaded will be gone. You need to move them outside the app into persistent storage, which you can then access from elsewhere too (think S3 bucket or similar). Note I can only judge based on *what you wrote*, which referred to source code not user uploaded content. – jonrsharpe Aug 29 '17 at 10:46
  • Thanks for your answer. Is there any official link to examine this senario ? – user7369339 Aug 29 '17 at 10:56
  • I'm not sure exactly what you mean, but the broad idea is basic 12-factor stuff: https://12factor.net/. For CF specifically: https://docs.cloudfoundry.org/devguide/deploy-apps/prepare-to-deploy.html – jonrsharpe Aug 29 '17 at 11:02
  • It helped. Thanks.Is there any way to download the project folders back to local ?. – user7369339 Aug 29 '17 at 11:24
  • Did you search at all? Because https://stackoverflow.com/questions/21421474/is-it-possible-to-download-all-files-of-an-application-in-cloud-foundry came up immediately. – jonrsharpe Aug 29 '17 at 13:27

1 Answers1

1

It isn't recommended to write files to the filesystem in a Cloud Foundry app on Bluemix, it's purely a runtime. If you need to store files, try using the Object Storage offering on Bluemix https://console.bluemix.net/catalog/services/Object-Storage which will keep your files safe and allow you to access them, back them up, or whatever you need.

Lorna Mitchell
  • 1,819
  • 13
  • 22
  • Is there Node sdk to implement upload and download functionality using Object Storage ?? – user7369339 Aug 30 '17 at 05:40
  • @user7369339 requests to recommend off site resources like libraries are explicitly off topic. I'd imagine a search engine can help you answer that yourself. – jonrsharpe Aug 30 '17 at 06:44