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 <yourcontainername> /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 <yourcontainername>:/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 is stored, as shown in the following commands.
    Please be careful to delete these volumes only. 

    docker volume rm htmldata dbdata
  5. Pull the latest FileCloud Docker image.

    docker pull filecloud/fileclouddocker:23.232.1 
  6. Start the container using the freshly pulled Docker image.

    sudo docker run --privileged -d -p 443:443 -p 80:80 -v fcdata:/opt/fileclouddata -v dbdata:/var/lib/mongodb -v solrdata:/opt/solrfcdata/var/solr -v htmldata:/var/www/html --name <yourcontainername> <current_image_name:tag> /lib/systemd/systemd 
  7. Copy the dump folder created in step 2 to your container, and restore the database.

    docker cp dump <yourcontainername>:/
    docker exec -i <yourcontainername> /usr/bin/mongorestore --noIndexRestore --drop
  8. Confirm that the container is running.

    root@docker:/home/nsadm# docker ps -a
    CONTAINER ID   IMAGE                                   COMMAND                  CREATED         STATUS            PORTS                                                                      NAMES
    31a8167e2731   filecloud/filecloudserver23.1:latest    "/lib/systemd/..."   3 minutes ago   Up 23 seconds>80/tcp, :::80->80/tcp,>443/tcp, :::443->443/tcp    filecloud.server
  9. Set the compatibility version for MongoDB to 6.0.

    root@docker:/home/nsadm# docker exec -it <yourcontainername> 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. When you log in to FileCloud, if you see the following notification, set Storage Path to /opt/fileclouddata.

  11. Confirm that everything is working as expected in the FileCloud user portal and admin portal.