Performing backups

  1. Document files

    To backup the existing data, stop the image and copy the content of the volume. For the example:

    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:3.3.13
    

    That would be the /docker-volumes/mayan folder:

    sudo tar -zcvf backup.tar.gz /docker-volumes/mayan
    sudo chown `whoami` backup.tar.gz
    
  2. 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.

Restoring from a backup

  1. Document files

    Uncompress the backup archive in the original docker volume using:

    sudo tar -xvzf backup.tar.gz -C /
    
  2. Database