Upgrading the Docker Image from Version 22.x or older to Version 23.x

FileCloud versions 23.x require MongoDB version 6. To upgrade to MongoDB version 6, you must upgrade the Docker image to 23.x.

Before upgrade, make a backup or take a snapshot of your server.

To upgrade the Docker image:

  1. To create a dump of the database, enter the following into the command line:

    docker exec -i filecloud.mongodb /usr/bin/mongodump
  2. Copy the dump folder from the container to the host machine.
    Note: Do not delete the dump folder. You are required to use it in step 7 to restore the database.

    docker cp filecloud.mongodb:/dump .

    To make sure the dump folder has been copied successfully to the host machine, enter:

    ls -l dump
  3. List the volumes:

    root@docker:/# docker volume ls
    local     nsadm_cloud_data
    local     nsadm_mongo_database
    local     nsadm_solr_data
    local     nsadm_var_html
  4. Delete the database volume and the Filecloud server volume where the application code files are stored, as shown in the following commands.
    Please be careful to delete these volumes only. 

    root@docker:/home/nsadm# docker volume rm nsadm_mongo_database
    root@docker:/home/nsadm# docker volume rm nsadm_var_html
  5. Edit your docker-compose.yml file, and change the version of MongoDB to mongo:6.0.8 and FileCloud server to filecloud/filecloudserver23.1:latest as shown below:

    version: '3'
            container_name: 'filecloud.mongodb'
            image: mongo:6.0.8
                - mongodb_data_container=/data/db
                - mongo_database:/data/db
              container_name: 'filecloud.server'
              image: filecloud/filecloudserver23.1:latest
                  - filecloud.mongodb
                  - filecloud.preview
                  - cloud_data:/var/clouddata
                  - var_html:/var/www/html
                  - filecloud.mongodb
                  - "80:80"
                  - "443:443"
  6. Start Docker using the new docker-compose.yml file

    docker-compose up -d
  7. Copy the dump folder created in step 2 to the filecloud.mongodb container, and restore the database.

    docker cp dump filecloud.mongodb:/
    docker exec -i filecloud.mongodb /usr/bin/mongorestore --noIndexRestore --drop
  8. Confirm that the containers are running.

    root@docker:/home/nsadm# docker ps -a
    CONTAINER ID   IMAGE                                   COMMAND                  CREATED         STATUS            PORTS                                                                      NAMES
    31a8167e2731   filecloud/filecloudserver23.1:latest    "bash /usr/local/bin…"   3 minutes ago   Up 23 seconds>80/tcp, :::80->80/tcp,>443/tcp, :::443->443/tcp    filecloud.server
    5bdb04b9f5fb   mongo:6.0.8                             "docker-entrypoint.s…"   3 minutes ago   Up 34 seconds     27017/tcp                                                                     filecloud.mongodb
    b1466b6088ab   filecloud/filecloudsolr21.3:latest      "sh /opt/solr/docker…"   3 minutes ago   Up 23 seconds     8983/tcp                                                                     filecloud.solr
    304de38d3fa0   filecloud/filecloudpreview22.1:latest   "/opt/libreoffice/in…"   3 minutes ago   Up 24 seconds                                                                                   filecloud.preview
  9. Set the compatibility version for MongoDB to 6.0.

    root@docker:/home/nsadm# docker exec -it filecloud.mongodb bash -c 'mongosh --eval "db.adminCommand( { setFeatureCompatibilityVersion: \"6.0\" } )"'
    Current Mongosh Log ID: 64b8b48af3fc5d6bfffc1149
    Connecting to:          mongodb://
    Using MongoDB:          6.0.8
    Using Mongosh:          1.10.1
    For mongosh info see: https://docs.mongodb.com/mongodb-shell/
    To help improve our products, anonymous usage data is collected and sent to MongoDB periodically (https://www.mongodb.com/legal/privacy-policy).
    You can opt-out by running the disableTelemetry() command.
       The server generated these startup warnings when booting
       2023-07-20T04:12:49.344+00:00: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine. See http://dochub.mongodb.org/core/prodnotes-filesystem
       2023-07-20T04:12:49.774+00:00: Access control is not enabled for the database. Read and write access to data and configuration is unrestricted
       2023-07-20T04:12:49.774+00:00: vm.max_map_count is too low
    { ok: 1 }
  10. Confirm that everything is working as expected in the FileCloud user portal and admin portal.