Backups and Restore

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

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

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)