Skip to content

NimTechnology

Trình bày các công nghệ CLOUD một cách dễ hiểu.

  • Kubernetes & Container
    • Docker
    • Kubernetes
      • Ingress
      • Pod
    • Helm Chart
    • OAuth2 Proxy
    • Isito-EnvoyFilter
    • Apache Kafka
      • Kafka
      • Kafka Connect
      • Lenses
    • Vault
    • Longhorn – Storage
    • VictoriaMetrics
    • MetalLB
    • Kong Gateway
  • CI/CD
    • ArgoCD
    • ArgoWorkflows
    • Argo Events
    • Spinnaker
    • Jenkins
    • Harbor
    • TeamCity
    • Git
      • Bitbucket
  • Coding
    • DevSecOps
    • Terraform
      • GCP – Google Cloud
      • AWS – Amazon Web Service
      • Azure Cloud
    • Golang
    • Laravel
    • Python
    • Jquery & JavaScript
    • Selenium
  • Log, Monitor & Tracing
    • DataDog
    • Prometheus
    • Grafana
    • ELK
      • Kibana
      • Logstash
  • BareMetal
    • NextCloud
  • Toggle search form

[Nextcloud] Install and Upgrade new version for Nextcloud Docker.

Posted on October 22, 2021June 5, 2023 By nim 8 Comments on [Nextcloud] Install and Upgrade new version for Nextcloud Docker.

Contents

Toggle
    • 1) Upgrade new version
    • 2) các command hay sử dụng
  • 3) Update các index missing trong DB
  • 4) Mount ổ cứng
  • 5) Not See any file in folder

1) Upgrade new version

https://help.nextcloud.com/t/exit-maintanence-mode-in-docker/34434

Version Hiện tại là 22.0.0
Nếu bạn ko có dòng này thi thêm vô nhé
'maintenance' => true
save file và truy cập lại ntn

Giờ thực hiện remove container và remove image cũ
-> cách này có downtime chút.

docker rm -f d7476f756627
docker rmi arm32v7/nextcloud

Bí quyết đây bạn lưu lại câu run docker lúc trước nhé, không là hơi khoai đây

docker run -d -p 8083:80 \
--restart=always --env PHP_UPLOAD_LIMIT=30G \
--name nextcloud23 \
-v /home/oCungToshiba/nextcloud22_2/docker/nextcloud:/var/www/html \
-v /home/oCungToshiba/nextcloud22_2/docker/apps:/var/www/html/custom_apps \
-v /home/oCungToshiba/nextcloud22_2/docker/config:/var/www/html/config \
-v /home/oCungToshiba/nextcloud22_2/docker/data:/var/www/html/data \
-v /home/usb_nim_1tb:/usr/local/src_1tb \
-v /home/usb_nim_2tb:/usr/local/src_2tb \
arm32v7/nextcloud:24.0.4

Khi completed thì chuyển maintenance thành false

Đôi khi cần check database bạn cứ ok nhé

2) các command hay sử dụng

Sync data giữa các thư mục.

rsync -avzh /home/oCungToshiba/nextcloud22/docker/data/ngoc/ /home/oCungToshiba/nextcloud22_2/docker/data/ngoc/

3) Update các index missing trong DB

docker exec -it -u www-data nextcloud22_2 php occ db:add-missing-indices

4) Mount ổ cứng

mount -t ntfs -o umask=000,gid=0,uid=33 /dev/sdc1 /home/usb_nim_2tb/
mount -t ntfs -o umask=000,gid=0,uid=33 /dev/sda1 /home/usb_nim_1tb/

5) Not See any file in folder

Nếu bạn thấy 1 folder trống trơn.
Mặc dù bạn đã exec container và thấy có file trong container

Bạn sử dụng lệnh bên dưới.

docker exec -it -u www-data nextcloud23 php occ files:scan --all

Bạn chui vào container:

apt-get install -y convmv
convmv -f utf-8 -t utf-8 --notest --nfc -r "folder/"

Nếu bạn gặp lỗi bên dới thì bạn chui và0 Database

Exception during scan: “files/0c806b12710ceafd3b364dc493ac73bb”(“local::/usr/local/src_1tb/::scanner::”) is locked

root@raspberrypi:/home/docker/mariadb# docker exec -it mariadb-nim mysql -u root -p
Enter password:
MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| nextcloud          |
| nextcloud22        |
| nextcloud22_2      |
| performance_schema |
+--------------------+
6 rows in set (0.025 sec)

MariaDB [(none)]> use nextcloud22_2;

MariaDB [nextcloud22_2]> SELECT * FROM oc_file_locks WHERE oc_file_locks.lock != 0;
+--------+------+----------------------------------------+------------+
| id     | lock | key                                    | ttl        |
+--------+------+----------------------------------------+------------+
| 685218 |   -1 | files/0c806b12710ceafd3b364dc493ac73bb | 1670135436 |
| 685219 |    1 | files/aa8b5199515211b3f411e6c659bcd431 | 1670135436 |
| 685702 |    1 | files/4a235d41ca68898c2ff706a175646ad6 | 1670135463 |
+--------+------+----------------------------------------+------------+
3 rows in set (0.153 sec)

MariaDB [nextcloud22_2]> DELETE FROM oc_file_locks WHERE oc_file_locks.lock != 0;
Query OK, 567 rows affected (0.446 sec)
BareMetal, Docker, NextCloud

Post navigation

Previous Post: [Istio] OMG – Metric of an Istiod pod had 2 versions. Why???
Next Post: [Jenkins] Install Jenkins StandAlone in Kubernetes

More Related Articles

[Physical] HUANANZHI TF AD3 GREEN F8T8 COOLER MOS FAN BareMetal
[Docker] Comand Docker hay quên!! Docker
[Fortigate] Cấu hình firewall fortigate gửi syslog sang Logstash BareMetal
[Remote App/windows] Hướng dẫn cài đặt remote app trên windows để build hệ thông vdi Pro. BareMetal
[Docker] “unsafe repository” when building the Docker image. Docker
[RedisInsight] Developer GUI for Redis, by Redis Docker

Comments (8) on “[Nextcloud] Install and Upgrade new version for Nextcloud Docker.”

  1. medicine online order says:
    April 29, 2022 at 4:50 pm

    Its like you read my mind! You appear to know a lot about
    this, like you wrote the book in it or something.
    I think that you can do with some pics to drive
    the message home a little bit, but other than that, this is great blog.
    A great read. I’ll definitely be back.

    Reply
    1. nim says:
      April 29, 2022 at 6:02 pm

      Always welcome dear!!!

      Reply
  2. order medicine online says:
    June 7, 2022 at 2:32 pm

    Hello, its pleasant post regarding media print, we all be aware of media is a wonderful source of facts.

    Reply
    1. nim says:
      June 7, 2022 at 2:48 pm

      Thank you for reading my post

      Reply
  3. medicine online order says:
    June 30, 2022 at 12:29 pm

    Aw, this was an exceptionally nice post. Taking the time and actual effort to
    make a very good article… but what can I say…
    I procrastinate a lot and don’t seem to get anything done.

    Reply
    1. nim says:
      June 30, 2022 at 4:29 pm

      Thank you for watching my post

      Reply
  4. pharmacies shipping to usa says:
    July 15, 2022 at 6:38 pm

    These are truly fantastic ideas in concerning blogging.
    You have touched some fastidious things here. Any way
    keep up wrinting.

    Reply
  5. medicine online order says:
    November 24, 2022 at 11:21 pm

    Good information. Lucky me I came across your
    blog by accident (stumbleupon). I have bookmarked it for later!

    Reply

Leave a Reply to pharmacies shipping to usa Cancel reply

Your email address will not be published. Required fields are marked *

Tham Gia Group DevOps nhé!
Để Nim có nhiều động lực ra nhiều bài viết.
Để nhận được những thông báo mới nhất.

Recent Posts

  • [Azure] The subscription is not registered to use namespace ‘Microsoft.ContainerService’ May 8, 2025
  • [Azure] Insufficient regional vcpu quota left May 8, 2025
  • [WordPress] How to add a Dynamic watermark on WordPress. May 6, 2025
  • [vnet/Azure] VNet provisioning via Terraform. April 28, 2025
  • [tracetcp] How to perform a tracert command using a specific port. April 3, 2025

Archives

  • May 2025
  • April 2025
  • March 2025
  • February 2025
  • January 2025
  • December 2024
  • November 2024
  • October 2024
  • September 2024
  • August 2024
  • July 2024
  • June 2024
  • May 2024
  • April 2024
  • March 2024
  • February 2024
  • January 2024
  • December 2023
  • November 2023
  • October 2023
  • September 2023
  • August 2023
  • July 2023
  • June 2023
  • May 2023
  • April 2023
  • March 2023
  • February 2023
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022
  • August 2022
  • July 2022
  • June 2022
  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • July 2021
  • June 2021

Categories

  • BareMetal
    • NextCloud
  • CI/CD
    • Argo Events
    • ArgoCD
    • ArgoWorkflows
    • Git
      • Bitbucket
    • Harbor
    • Jenkins
    • Spinnaker
    • TeamCity
  • Coding
    • DevSecOps
    • Golang
    • Jquery & JavaScript
    • Laravel
    • NextJS 14 & ReactJS & Type Script
    • Python
    • Selenium
    • Terraform
      • AWS – Amazon Web Service
      • Azure Cloud
      • GCP – Google Cloud
  • Kubernetes & Container
    • Apache Kafka
      • Kafka
      • Kafka Connect
      • Lenses
    • Docker
    • Helm Chart
    • Isito-EnvoyFilter
    • Kong Gateway
    • Kubernetes
      • Ingress
      • Pod
    • Longhorn – Storage
    • MetalLB
    • OAuth2 Proxy
    • Vault
    • VictoriaMetrics
  • Log, Monitor & Tracing
    • DataDog
    • ELK
      • Kibana
      • Logstash
    • Fluent
    • Grafana
    • Prometheus
  • Uncategorized
  • Admin

Copyright © 2025 NimTechnology.