I create many objects in the Wolfram Cloud. They are all connected by menu bars and form a complete application. All objects are stored in a cloud folder. As we create a release for every sprint it becomes more and more important to backup the different versions of the application.
I tried the following to backup my app to a local folder:
create two deployed objects:
CloudDeploy[
FormFunction[{"x" -> "Integer"}, #x! &], "/appdir3/myobject1"]
CloudDeploy[
FormFunction[{"y" -> "Integer"}, #y! &], "/appdir3/myobject2"]
Ask your desktop frontend to create a backup of all objects:
CopyDirectory[CloudObject["/appdir3"], "E:\\folder\\backup06"]
Works as expected. Two files contain Mathematica code in text. Copy it back to the cloud using CopyDirectory
CopyDirectory["E:\\folder\backup6", CloudObject["/appdir4/"]]
The Cloudobject folder is created but no files are copied to the cloud.
Lets try this file by file.
SetDirectory["E:\\folder\\backup06"]
myfilenames = FileNames[]
CopyFile[#, CloudObject["/appdir4/" <> ToString[#]]] & /@ myfilenames
Works as expected. The two cloudobjects are now visible via the Cloud WebFrontend. Using CloudObjects["/appdir4"] proves the objects are there and can be contacted.
The only issue is that the links CloudObjects produces don't work. The WebFrontend just opens a notebook with the expression in text. Clicking the link in the desktop FrontEnd results in the browser asking what to do with the file because it probably does not recognize the mime type.
Backup and restore cloudfiles is essential for my work. Let me know if I made a mistake or should follow another set of steps.