1) Upgrade new version
https://help.nextcloud.com/t/exit-maintanence-mode-in-docker/34434
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
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)
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.
Always welcome dear!!!
Hello, its pleasant post regarding media print, we all be aware of media is a wonderful source of facts.
Thank you for reading my post
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.
Thank you for watching my post
These are truly fantastic ideas in concerning blogging.
You have touched some fastidious things here. Any way
keep up wrinting.
Good information. Lucky me I came across your
blog by accident (stumbleupon). I have bookmarked it for later!