.. _backup-restore: Back Up and Recover FindFace Multi and Its Data ================================================== You can back up FindFace Multi before uninstalling it to recover the product and its data later on. .. rubric:: In this section: .. contents:: :local: .. _back-up-findface-multi: Back up FindFace Multi --------------------------- To back up your FindFace Multi instance and its data, run the following commands: .. code:: sudo tar -cvzf ~/configs.tar.gz -C /opt/findface-multi/ configs sudo tar -cvzf ~/data.tar.gz -C /opt/findface-multi/ data sudo cp /opt/findface-multi/docker-compose.yaml ~/ If you use tiered data storage and have enabled saving to :ref:`hot storage `, then as a result of the backup, thumbnails and full frame images that were not transferred to the cold storage will not be saved. If you need to back up all images, do the following: #. Install the ``rsynk`` utility. .. code:: sudo apt install rsync #. Force the transfer of images by copying them from the hot to the cold storage. .. note:: The ``ssd-path`` is a path (directory) to the SSD that is being used for the hot storage. Here and on replace the ``ssd-path`` with an existing SSD directory. .. code:: rsync -aP /ssd-path/event/ /opt/findface-multi/data/findface-multi-legacy/uploads/event/ #. Back up your FindFace Multi instance and its data by running commands above. .. _recover-findface-multi-and-its-data: Recover FindFace Multi and Its Data --------------------------------------- To restore FindFace Multi and its data from the backup, do the following: #. Download the installer file ``findface-*.run``. #. Put the ``.run`` file into some directory on the designated host (for example, ``/home/username``). #. From this directory, make the ``.run`` file executable. .. note:: Be sure to specify the actual file name instead of ``findface-*``. .. code:: chmod +x findface-*.run #. Execute the ``.run`` file. .. code:: sudo ./findface-*.run #. Go through the installation process as described :ref:`here `. #. After you have finished the installation, to restore FindFace Multi, its data and configuration files, stop all FindFace Multi containers. .. code:: cd /opt/findface-multi sudo docker-compose stop #. Remove new configuration files and data generated and created by the installer and restore them from the backup. .. important:: Compare your old ``~/docker-compose.yaml`` file that you have copied during the backup process against the new one ``/opt/findface-multi/docker-compose.yaml``. You may need to apply changes to the old ``~/docker-compose.yaml`` file if you previously configured it to bring or exclude services or made any other changes. You must be fully aware of what you are doing by replacing the new ``docker-compose.yaml`` file with the old one. .. code:: sudo rm -r /opt/findface-multi/configs/* sudo tar -xvf ~/configs.tar.gz -C /opt/findface-multi/ sudo rm -r /opt/findface-multi/data/* sudo tar -xvf ~/data.tar.gz -C /opt/findface-multi/ sudo cp ~/docker-compose.yaml /opt/findface-multi/ #. Restart FindFace Multi containers. .. code:: cd /opt/findface-multi sudo docker-compose up -d