Method: Unifi::Api::Controller#get_backup
- Defined in:
- lib/unifi/api.rb
#get_backup(target_file = 'unifi-backup.unf') ⇒ Object
121 122 123 124 125 126 127 128 |
# File 'lib/unifi/api.rb', line 121 def get_backup(target_file='unifi-backup.unf') download_path = create_backup unifi_archive = read("#{url}#{download_path}", nil, :post) File.open(target_file, "wb") do |f| f.write(unifi_archive) end end |