calmh/unifi-api — pull request #4 by matsimon (2013-09-05 13:11:14+00:00)
Title: Complete backup methods

I almost forgot that I used to have an ugly hack for the cookie required for the backup download, otherwise you'll only get a garbage file that you can't restore.

Thus I created the download method since always re-creating for downloads puts high load on production systems. This is also the cause for adding a note in the doc and the code.

Example: A dual core controller VM with 70 APs takes up 3 minutes to complete and other requests may time out in the meantime. I heavily depends on the size of the controller.

Since we have no doc if the backup file is stored, or thrown away after a session I assume we have to create it before dowloading it. But you can download a backup as many times as you whish after creating it during a session. Restoring the resulting file workd from a 2.4.5 production controller to another 2.4.5 test controller.

Feel free to criticise as usual as it's your code. :-)