Hi,

I’m new to docker and mailcow. Mailcow is up and running behind Traefik and I have moved the vmail Volume to a zfs pool (according to this: Redirecting...

).

I have installed Nextcloud via the helper script, all went well. I now want to move the Nextcloud data folder (.data/web/nextcloud/data) to a zfs pool as well. I only want to move the Nextcloud data folder, not the whole /web folder. Any clue how I could achieve this?

Thanks in advance

  • Got it to work. After realizing that the /web Folder was mounted by the php-fpm image and not by the nginx image, it was easy to fix it via docker-compose.override.

Got it to work. After realizing that the /web Folder was mounted by the php-fpm image and not by the nginx image, it was easy to fix it via docker-compose.override.

Have something to say?

Join the community by quickly registering to participate in this discussion. We'd like to see you joining our great moo-community!

4 months later

Hi Beerlao,

I am quite new on docker things and mailcow too,
i also try installing nexcloud using the helper script.

could you help me out the detail regarding docker-compose.overide

    jtdoank Sure. You have to mount the /web Folder for your PHP-FPM Container:

    Replace /path/to/your/persistent/datafolder with your local data folder (where nextcloud stores it’s user data; could be something like /var/www/html/data.

    docker-compose.override.yml

    php-fpm-mailcow:
      volumes:
              - /path/to/your/persistent/datafolder:/web/nextcloud/data:rw

    wow, thanks for the prompt reply
    let me recheck on it

    thanks alot buddy

    hahaha, trying several way but not working.
    could you help elaborate more

    🙏🙏🙏

      jtdoank Be more specific. What does “not working” mean?

      I’ve got this

      ERROR: Version mismatch: file ./docker-compose.yml specifies version 3.9 but extension file ./docker-compose.override.yml uses version 1

        jtdoank What does:

        docker-compose version
        docker version
        grep "version" docker-compose.yml
        grep "version" docker-compose.override.yml

        say?

        Rough guess: Try setting “version” in both docker-compose.yml and docker-compose-override.yml to ‘2.1’.

        I think, i have wrong creating the docker-compose.override.yml
        let me google it how the create proper docker-compose.override.yml
        or could you inform to me link that i can create it

        cause i really quite new on docker 🙏

          jtdoank Don’t ever change the docker-compose.yml - replace it with the one from the repo. Put all your local adjustments in docker-compose-override.yml. Start with this:

          version: '2.1'
          
          services:
          php-fpm-mailcow:
            volumes:
                    - /path/to/your/persistent/datafolder:/web/nextcloud/data:rw

          Finally got working
          Thanks alot buddy

          version: '2.1'
          
          services:
           php-fpm-mailcow:
            volumes:
                    - /path/to/your/persistent/datafolder:/web/nextcloud/data:rw

          need 1 space on php-fpm-mailcow
          hahaha couple time i got

          ERROR: In file ‘./docker-compose.override.yml’, service must be a mapping, not a NoneType.

          but now is working and nicely done after I move all the data from /web/nextcloud/data to /path/to/your/persistent/datafolder

          next thisngs to do is edit the php.ini

          could you also helping edit the php.ini file
          where exactly the file

          btw it seems that when backup using helper script the nextcloud is not backup too isn’t?

          did you already try to backup and restore and migrate to different server?

            jtdoank I never used the helper script for backup. For your Nextcloud data, you only need to backup your data folder as well as your mysql tables. You can use any backup tool you want. As I’m using zfs, backups are a matter of ‘zfs snapshot’.

            Modifying php.ini: Check mailcow/mailcow-dockerized590

            Glad that it’s working now for you.

              Thanks to you that it all working 🙏
              let me check the php.ini as the link you give to me

              beerlao backup your data folder as well as your mysql tables

              data already, and how we can backup the mysql on docker could you help me again

                jtdoank source mailcow.conf; docker exec -it $(docker ps -f name=mysql-mailcow -q) /bin/sh -c "mysqldump -u ${DBUSER} -p${DBPASS} --all-databases" > ./backup.mysql

                Most of your questions should easyly be answered by a short google search…

                  beerlao
                  Thanks alot Beerlao

                  So sorry if the questions and let me more search later on 🙏

                  4 days later

                  beerlao
                  brother, i seems that the helper scripts backup also backup all the database sadly isnot the data hehehe…
                  anyway thanks alot brother, i learn alot from you

                  No one is typing