Backup

You can backup your DeepStack data including registered faces and custom models. At any time, you can restore your data back.

Backups

The code below downloads your entire DeepStack data as a single zip file

python
import requests
from io import  open
import shutil

data = requests.post("http://localhost:80/v1/backup",stream=True)

with open("backupdeepstack.zip", "wb") as file:
    shutil.copyfileobj(data.raw, file)
del data

Restore

The code below restores your DeepStack data from a saved backup.

python
import requests
from io import  open
import time

image_data = open("backupdeepstack.zip","rb").read()

response = requests.post("http://localhost:80/v1/restore",files={"file":image_data}).json()
print(response)