code: def get_backup(self, target_file='unifi-backup.unf'):
          
          download_path = self.create_backup()
  
          opener = self.opener.open(self.url + download_path)
          unifi_archive = opener.read()
  
          backupfile = open(target_file, 'w')
          backupfile.write(unifi_archive)
          backupfile.close()
docs: Get a backup archive from a controller.
  
          Arguments:
              target_file -- Filename or full path to download the backup archive to, should have .unf extension for restore.