.. _backup-restore: Back Up and Recover FindFace CIBR and Its Data ================================================== You can back up FindFace CIBR before uninstalling it to recover the product and its data later on. .. rubric:: In this section: .. contents:: :local: .. _back-up-findface-cibr: Back up FindFace CIBR --------------------------- To back up your FindFace CIBR instance and its data, run the following commands: .. code:: sudo tar -cvzf ~/configs.tar.gz -C /opt/findface-cibr/ configs sudo tar -cvzf ~/data.tar.gz -C /opt/findface-cibr/ data sudo cp /opt/findface-cibr/docker-compose.yaml ~/ .. _recover-findface-cibr-and-its-data: Recover FindFace CIBR and Its Data --------------------------------------- To restore FindFace CIBR 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 CIBR, its data and configuration files, stop all FindFace CIBR containers. .. code:: cd /opt/findface-cibr 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-cibr/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-cibr/configs/* sudo tar -xvf ~/configs.tar.gz -C /opt/findface-cibr/ sudo rm -r /opt/findface-cibr/data/* sudo tar -xvf ~/data.tar.gz -C /opt/findface-cibr/ sudo cp ~/docker-compose.yaml /opt/findface-cibr/ #. Restart FindFace CIBR containers. .. code:: cd /opt/findface-cibr sudo docker-compose up -d