============================
Backing up and restoring AEN
============================


Creating an AEN backup
======================

#. Back up and test the AEN database with the mongodump utility:

   .. code-block:: bash

      mongodump -o wakari_dump > wakari_backup.log
      tar cvf wakari_backup.tar ./wakari_dump

#. Back up the project files in ``/projects/\*``.

#. Back up the configuration files.

   * ``/opt/wakari/wakari-server/etc/\*``
   * ``/opt/wakari/wakari-gateway/etc/\*``
   * ``/opt/wakari/wakari-compute/etc/\*``


Restoring an AEN backup
=======================

#. Re-install AEN.

#. :ref:`Stop AEN processes <stop-services>`.

#. Restore the database using the mongorestore utility.

#. Restore the ``/projects/\*`` backup.

#. Verify the permissions of the directories and files in
   ``/projects``.

#. Restore the configuration file backups.

#. :ref:`Start AEN processes <start-services>`.
