Update documentation
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
This commit is contained in:
@@ -4,29 +4,44 @@
|
||||
Performing backups
|
||||
==================
|
||||
|
||||
To backup the existing data, stop the image and copy the content of the volume.
|
||||
For the example::
|
||||
#. Document files
|
||||
|
||||
docker run -d --name mayan-edms --restart=always -p 80:8000 \
|
||||
-v /docker-volumes/mayan:/var/lib/mayan \
|
||||
-v /opt/scanned_files:/scanned_files mayanedms/mayanedms:latest
|
||||
To backup the existing data, stop the image and copy the content of the volume.
|
||||
For the example::
|
||||
|
||||
That would be the ``/docker-volumes/mayan folder``::
|
||||
docker run -d --name mayan-edms --restart=always -p 80:8000 \
|
||||
-v /docker-volumes/mayan:/var/lib/mayan \
|
||||
-v /opt/scanned_files:/scanned_files mayanedms/mayanedms:|DOCKER_MAYAN_IMAGE_VERSION|
|
||||
|
||||
sudo tar -zcvf backup.tar.gz /docker-volumes/mayan
|
||||
sudo chown `whoami` backup.tar.gz
|
||||
That would be the ``/docker-volumes/mayan folder``::
|
||||
|
||||
If using an external PostgreSQL or MySQL database or database containers, these
|
||||
too need to be backed up using their respective procedures. A simple solution
|
||||
is to copy the entire database container volume after the container has
|
||||
been stopped.
|
||||
sudo tar -zcvf backup.tar.gz /docker-volumes/mayan
|
||||
sudo chown `whoami` backup.tar.gz
|
||||
|
||||
#. Database
|
||||
|
||||
If using an external PostgreSQL or MySQL database or database containers, these
|
||||
too need to be backed up using their respective procedures. A simple solution
|
||||
is to copy the entire database container volume after the container has
|
||||
been stopped.
|
||||
|
||||
- PostgreSQL: https://www.postgresql.org/docs/current/backup-dump.html
|
||||
- MySQL: https://dev.mysql.com/doc/refman/5.7/en/mysqldump.html
|
||||
|
||||
|
||||
=======================
|
||||
Restoring from a backup
|
||||
=======================
|
||||
|
||||
Uncompress the backup archive in the original docker volume using::
|
||||
|
||||
sudo tar -xvzf backup.tar.gz -C /
|
||||
#. Document files
|
||||
|
||||
Uncompress the backup archive in the original docker volume using::
|
||||
|
||||
sudo tar -xvzf backup.tar.gz -C /
|
||||
|
||||
|
||||
#. Database
|
||||
|
||||
- PostgreSQL: https://www.postgresql.org/docs/current/backup-dump.html
|
||||
- MySQL: https://dev.mysql.com/doc/refman/5.7/en/mysqldump.html
|
||||
|
||||
@@ -8,12 +8,16 @@ Use this method to avoid having to expose PostreSQL port to the host's network
|
||||
or if you have other PostgreSQL instances but still want to use the default
|
||||
port of 5432 for this installation.
|
||||
|
||||
#. Create the network::
|
||||
#. Create the network:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
docker network create mayan
|
||||
|
||||
#. Launch the PostgreSQL container with the network option and remove the
|
||||
port binding (``-p 5432:5432``)::
|
||||
port binding (``-p 5432:5432``):
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
docker run \
|
||||
-d \
|
||||
@@ -27,7 +31,9 @@ port of 5432 for this installation.
|
||||
|DOCKER_POSTGRES_IMAGE_VERSION|
|
||||
|
||||
#. Launch the Redis container with the network option and remove the port
|
||||
binding (``-p 6379:6379``)::
|
||||
binding (``-p 6379:6379``):
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
docker run \
|
||||
-d \
|
||||
@@ -44,7 +50,9 @@ port of 5432 for this installation.
|
||||
|
||||
#. Launch the Mayan EDMS container with the network option and change the
|
||||
database hostname to the PostgreSQL container name (``mayan-edms-postgres``)
|
||||
instead of the IP address of the Docker host (``172.17.0.1``)::
|
||||
instead of the IP address of the Docker host (``172.17.0.1``):
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
docker run \
|
||||
-d \
|
||||
@@ -56,4 +64,4 @@ port of 5432 for this installation.
|
||||
-e MAYAN_CELERY_BROKER_URL="redis://mayan-edms-redis:6379/0" \
|
||||
-e MAYAN_CELERY_RESULT_BACKEND="redis://mayan-edms-redis:6379/1" \
|
||||
-v /docker-volumes/mayan-edms/media:/var/lib/mayan \
|
||||
mayanedms/mayanedms:<version>
|
||||
mayanedms/mayanedms:|DOCKER_MAYAN_IMAGE_VERSION|
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
Simple Docker installation
|
||||
==========================
|
||||
|
||||
#. Install Docker
|
||||
#. Install Docker:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
@@ -18,35 +18,31 @@ Simple Docker installation
|
||||
the Docker image for Mayan EDMS.
|
||||
|
||||
|
||||
#. Download the Mayan EDMS Docker image
|
||||
#. Download the Mayan EDMS Docker image:
|
||||
|
||||
With Docker properly installed, proceed to download the Mayan EDMS Docker
|
||||
image using the command::
|
||||
image using the command:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
docker pull mayanedms/mayanedms:|DOCKER_MAYAN_IMAGE_VERSION|
|
||||
|
||||
Instead of a specific version tag you may use then generic ``latest`` tag
|
||||
to the get latest version available automatically. If you use the ``latest``
|
||||
tag here, remember to do so in the next steps also.::
|
||||
|
||||
docker pull mayanedms/mayanedms:latest
|
||||
|
||||
|
||||
#. Download the PostgreSQL Docker image
|
||||
#. Download the PostgreSQL Docker image:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
docker pull |DOCKER_POSTGRES_IMAGE_VERSION|
|
||||
|
||||
|
||||
#. Download the Redis Docker image
|
||||
#. Download the Redis Docker image:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
docker pull |DOCKER_REDIS_IMAGE_VERSION|
|
||||
|
||||
|
||||
#. Create and run a PostgreSQL container
|
||||
#. Create and run a PostgreSQL container:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
@@ -68,7 +64,7 @@ Simple Docker installation
|
||||
``/docker-volumes/mayan-edms/postgres`` folder.
|
||||
|
||||
|
||||
#. Create and run a Redis container
|
||||
#. Create and run a Redis container:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
@@ -91,7 +87,7 @@ Simple Docker installation
|
||||
configure to not save its content to disk and to automatically clear up
|
||||
memory.
|
||||
|
||||
#. Create and run a Mayan EDMS container
|
||||
#. Create and run a Mayan EDMS container:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
@@ -104,7 +100,7 @@ Simple Docker installation
|
||||
-e MAYAN_CELERY_BROKER_URL="redis://172.17.0.1:6379/0" \
|
||||
-e MAYAN_CELERY_RESULT_BACKEND="redis://172.17.0.1:6379/1" \
|
||||
-v /docker-volumes/mayan-edms/media:/var/lib/mayan \
|
||||
mayanedms/mayanedms:<version>
|
||||
mayanedms/mayanedms:|DOCKER_MAYAN_IMAGE_VERSION|
|
||||
|
||||
The Mayan EDMS container will connect to the PostgreSQL container via the
|
||||
``172.17.0.1`` IP address (the Docker host's default IP address). It will
|
||||
|
||||
Reference in New Issue
Block a user