Advice on Nexcloud structure

  • Hi,


    I have OMV5 and Nextcloud running for a few months now on a RPi4. During this time I was able to evaluate it and I'm happy with it. Now I would like to structure it the correct way.


    My setup is a RPi4 with a 4TB HDD (/srv/dev-disk-by-label-DATA/) and a 128GB SSD (/srv/dev-disk-by-label-OS/).


    Nextcloud docker stack and also Nextcloud data is on SSD.


    On the HDD I have shares for documents, photos, etc.


    With the end of google photos free option I want to use nextcloud as an alternative and will also use it as an alternative to dropbox. Since we are two users on nextcloud that want to use it mainly as a photo backup I'm expecting that in some months or a year the SSD will be full.


    1-Do you think it is ok to move the nextcloud data to the HDD?

    2-Will I notice any performance degradation?

    3-Since nextcloud needs to be always on it is ok the turn off the HDD spin down?


    4-How do I setup nextcloud to start using a shared folder on HDD? Do I only need to copy the folder /srv/dev-disk-by-label-OS/appdata/nextcloud/data/ to /srv/dev-disk-by-label-DATA/Nextcloud and then edit the volume? Or is there an automated way? I read on some posts about an External Storage App, is there any tutorial on how to set it up?


    Thank you

  • metRo_

    Hat den Titel des Themas von „Advice on Structure“ zu „Advice on Nexcloud structure“ geändert.
    • Offizieller Beitrag

    This might be a bit painful, but migration, if possible, may be more painful than a fresh install.

    1. Install your OS on a 32GIG SD card.
    2. When your OS is set up, in OMV-Extras change your Docker Storage Path to somewhere on your Data drive: /srv/dev-disk...../docker
    3. Create two shares on your Data drive: nextcloud, and appdata.
    4. Use macom ’s How-To Guide on installing Nextcloud using docker-compose.
    5. Bonus: buy a second SD card and learn how to back up your OS and how to recover from an OS failure.

    System Backup Typo alert: Under the Linux section the command should be sudo umount /dev/sda1 NOT sudo unmount /dev/sda1

    Backup Data Disk to Backup Disk on Same Machine: In a Scheduled Job:rsync -av --delete /srv/dev-disk-by-uuid-f8814ed9-9a5c-4e1c-8830-426968c20ea3/ /srv/dev-disk-by-uuid-e67439d5-00a3-4942-bd5f-b84ab86aa850/ Don't forget trailing slashes, and BE CAREFUL. (HT: Getting Started with OMV5)

    Equipment - Thinkserver TS140, NanoPi M4 (v.1), Odroid XU4 (Using DietPi): PiHole

  • My case scenario is exactly the same: two people cutting ties from Google Photos/Drive and updating all phone photos straight to Nextcloud on a RPi4 4Gb armhf (soon to change to 8Gb aarch64) with OS on a SSD but all running docker containers are on a 500Gb USB external HDD (ext4).


    Nextcloud is really fast (not before you tune it properly with several things that are on macomexcelent guide) (I'm also trying to make a small "RPi4 running Nextcloud on steroids" type of guide, :D WIP ).


    So, to answer your questions (and this is my experience up until now)


    1. Instead of "moving", make a verbatim copy of both "data" and "config" folders of Nextcloud from the SSD to the HDD.

    In order to do this in a safe way, you have to bring down your stack (and maybe, stop docker so no access is being done to the files, especially on the DB, or you might end with corrupted DB, trust me, it happens :( )


    2. I never ran it on SSD but, for me, speed is amazing (for a server on a SBC serving 2 users and on USB HDD.) (There are no miracles)

    Again, only after doing some tuning with info on the web. (Hint: "pm ondemand vs dynamic", "app preview generator", and some other's )

    Have a look on the guide mentioned above and read through for some tips and tricks. Then there's also The Q&A for the guide that answers a lot of things, if you care to read ALL of them (28 pages and counting, :) )


    3. Shouldn't the question be: "Is it ok to turn ON the spin down"???

    Why not??? If there is no access to the server (during the night, for eg.), it makes no sense to have the drives spinning needlessly.

    Unless you want to power down the server most of the time.

    Only issue is, when the drive(s) are spinned down, when access is "requested", there's some lag spinning them up but then, it's full throttle until they're not needed anymore.


    4. Login to Nextcloud as "admin" (or the user you created with admin rights) and activate the "external storage app".

    There's some posts here (will have to search for them) that explain how to access those shares via Nextcloud. No need for fancy configs on the OMV, ;)

  • This might be a bit painful, but migration, if possible, may be more painful than a fresh install.

    1. Install your OS on a 32GIG SD card.
    2. When your OS is set up, in OMV-Extras change your Docker Storage Path to somewhere on your Data drive: /srv/dev-disk...../docker
    3. Create two shares on your Data drive: nextcloud, and appdata.
    4. Use macom ’s How-To Guide on installing Nextcloud using docker-compose.
    5. Bonus: buy a second SD card and learn how to back up your OS and how to recover from an OS failure.

    I think you didn't understand my question and it is fair since my English isn't very good. I was looking to move only nextcloud data from one disk to another. But I'll take your advise and do a sdcard before try anything.

    1. Instead of "moving", make a verbatim copy of both "data" and "config" folders of Nextcloud from the SSD to the HDD.

    I don't expect config folder to grow very quickly, Am I wrong? I was thinking of "moving" only data. Is rsync ok make a verbatim copy?

  • I don't expect config folder to grow very quickly, Am I wrong?

    No it won't but backup backup backup (in this case all the configs of the containers that are part of the stack: nextcloud, mariadb, etc..)

    I was thinking of "moving" only data. Is rsync ok make a verbatim copy?

    You can move only the data and then alter the volume on the docker-compose.yml.

    Like I said above--^^^^ bring down the stack before doing it to prevent locked files (especially if you have a lot of files already in "data")


    [no root user but privileged sudo] I make my rsync backup with sudo rsync -aAXv /srv/dev-disk-by-label-DATA/appdata/ /home/pi/docker/backup_`date +"%Y%m%d"`/ to "clone" all that is bellow appdata (all containers configs and data)

    Of course, this is not "moving" to use it on another drive, I'm backing it and also adding a date at the same time to the folder to know when it was done.


    But this may give you an ideia of how to do it (in your case, something like: sudo rsync -aAXv /srv/dev-disk-by-label-OS/appdata/nextcloud/data /srv/dev-disk-by-label-DATA/Nextcloud/ <<---first path ends with data and the second path ends with Nextcloud/


    Just remember, don't rsync before bring down the stack or, at least Nextcloud and MariaDB.

    • Offizieller Beitrag

    metRo_ I didn't advise you to go the route of cloning your OS from your ssd to a SD card because I have never done it before and I didn't want to advise on something I have never done before. It was the same scenario on the moving of your Nextcloud/docker info. I am sure it can be done, but I have never done it.


    as Soma said above "backup backup backup". It looks like he has a good path for you in the previous post. I'm sure it will go well. Good luck.

    System Backup Typo alert: Under the Linux section the command should be sudo umount /dev/sda1 NOT sudo unmount /dev/sda1

    Backup Data Disk to Backup Disk on Same Machine: In a Scheduled Job:rsync -av --delete /srv/dev-disk-by-uuid-f8814ed9-9a5c-4e1c-8830-426968c20ea3/ /srv/dev-disk-by-uuid-e67439d5-00a3-4942-bd5f-b84ab86aa850/ Don't forget trailing slashes, and BE CAREFUL. (HT: Getting Started with OMV5)

    Equipment - Thinkserver TS140, NanoPi M4 (v.1), Odroid XU4 (Using DietPi): PiHole

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!