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

FileCloud versions 23.x require MongoDB version 7. To upgrade to MongoDB version 7, 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
    
    DRIVER    VOLUME NAME
    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
  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     0.0.0.0:80->80/tcp, :::80->80/tcp, 0.0.0.0:443->443/tcp, :::443->443/tcp    filecloud.server
  9. Set the compatibility version for MongoDB to 7.0.

    root@docker:/home/nsadm# docker exec -it <yourcontainername> bash -c 'mongosh --eval "db.adminCommand( { setFeatureCompatibilityVersion: \"7.0\" } )"'
  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.