NextCloud : Migration 29.0.10 vers 30.0.4.

En passant

Nextcloud

  • Release Note 30.0.4 : https://nextcloud.com/fr/changelog/#latest30
  • Release Note 29.0.10 : https://nextcloud.com/fr/changelog/#latest29

A la fin j’ai quand même fait :

# sudo -u www-data php /usr/share/nginx/nextcloud/occ files:scan --all
...
# sudo -u www-data php /usr/share/nginx/nextcloud/occ maintenance:repair --include-expensive
...
# sudo -u www-data php /usr/share/nginx/nextcloud/occ db:add-missing-indices
...

Nextcloud : Update with command line

Je me fais un petit mémo pour la prochaine fois.
Les commandes :

# sudo -u www-data php /usr/share/nginx/nextcloud/updater/updater.phar 
Nextcloud Updater - version: v29.0.0-1-g9293bcb dirty

Current version is 29.0.4.

Update to Nextcloud 29.0.5 available. (channel: "stable")
Following file will be downloaded automatically: https://download.nextcloud.com/server/releases/nextcloud-29.0.5.zip
Open changelog ↗

Steps that will be executed:
[✔] Check for expected files
[✔] Check for write permissions
[✔] Create backup
[✔] Downloading
[✔] Verify integrity
[ ] Extracting
[ ] Enable maintenance mode
[ ] Replace entry points
[ ] Delete old files
[ ] Move new files in place
[ ] Done

Continue update? [y/N] y
...
Update of code successful.

Should the "occ upgrade" command be executed? [Y/n] Y
...
# sudo -u www-data php /usr/share/nginx/nextcloud/occ maintenance:repair
# sudo -u www-data php /usr/share/nginx/nextcloud/occ upgrade
Nextcloud is already latest version
# sudo systemctl restart nginx.service
# sudo systemctl restart php8.1-fpm.service

Les dernières commandes sont pour ne pas avoir le problème : « Downgrading is not supported and is likely to cause unpredictable issues (from 29.0.5.1 to 29.0.4.1) »

Misère.

NextCloud : Saturation de l’espace disque via l’App Backup

Voici mes versions de NextCloud :

# sudo -u www-data php /usr/share/nginx/nextcloud/occ status
  - installed: true
  - version: 28.0.5.1
  - versionstring: 28.0.5
  - edition: 
  - maintenance: false
  - needsDbUpgrade: false
  - productname: Nextcloud
  - extendedSupport: false
 # sudo -u www-data php /usr/share/nginx/nextcloud/occ app:list | grep "backup:"
  - backup: 1.4.0

L’espace disque de l’Application Backup:

# du -sh /datadisk/nginx/nextcloud/data/appdata_ocjrumk06tlj/*
4,3M    /datadisk/nginx/nextcloud/data/appdata_ocjrumk06tlj/appstore
3,4M    /datadisk/nginx/nextcloud/data/appdata_ocjrumk06tlj/avatar
470G    /datadisk/nginx/nextcloud/data/appdata_ocjrumk06tlj/backup
12K /datadisk/nginx/nextcloud/data/appdata_ocjrumk06tlj/calendar
176K    /datadisk/nginx/nextcloud/data/appdata_ocjrumk06tlj/cms_pico
724K    /datadisk/nginx/nextcloud/data/appdata_ocjrumk06tlj/css
8,0K    /datadisk/nginx/nextcloud/data/appdata_ocjrumk06tlj/dashboard
2,0M    /datadisk/nginx/nextcloud/data/appdata_ocjrumk06tlj/dav-photocache
64K /datadisk/nginx/nextcloud/data/appdata_ocjrumk06tlj/identityproof
72K /datadisk/nginx/nextcloud/data/appdata_ocjrumk06tlj/js
8,8M    /datadisk/nginx/nextcloud/data/appdata_ocjrumk06tlj/photos
29G /datadisk/nginx/nextcloud/data/appdata_ocjrumk06tlj/preview
12K /datadisk/nginx/nextcloud/data/appdata_ocjrumk06tlj/text
2,1M    /datadisk/nginx/nextcloud/data/appdata_ocjrumk06tlj/theming

# du -sh /datadisk/nginx/nextcloud/data/appdata_ocjrumk06tlj/backup/*
4,4G    /datadisk/nginx/nextcloud/data/appdata_ocjrumk06tlj/backup/20240213180150-differential-mJwnsegWFWa32Ws
4,4G    /datadisk/nginx/nextcloud/data/appdata_ocjrumk06tlj/backup/20240216174222-differential-aEAkE921tEAZJxK
8,6G    /datadisk/nginx/nextcloud/data/appdata_ocjrumk06tlj/backup/20240219201105-differential-MNagUjAr5pJjKrJ
4,3G    /datadisk/nginx/nextcloud/data/appdata_ocjrumk06tlj/backup/20240312015208-differential-1gpv21O5ONWGpiQ
4,5G    /datadisk/nginx/nextcloud/data/appdata_ocjrumk06tlj/backup/20240315014502-differential-DzBeULCGG2VPXpG
8,6G    /datadisk/nginx/nextcloud/data/appdata_ocjrumk06tlj/backup/20240318014002-differential-lbn3GUyTard9ovF
4,5G    /datadisk/nginx/nextcloud/data/appdata_ocjrumk06tlj/backup/20240409020112-differential-rKxklcdNLfIOK1B
7,1G    /datadisk/nginx/nextcloud/data/appdata_ocjrumk06tlj/backup/20240412015108-differential-ZcGBuQaaneze68g
12G /datadisk/nginx/nextcloud/data/appdata_ocjrumk06tlj/backup/20240415013607-differential-FipWERobM4dFKdL
7,9G    /datadisk/nginx/nextcloud/data/appdata_ocjrumk06tlj/backup/20240427012058-differential-vTdMvZ5lrnuQe9M
9,6G    /datadisk/nginx/nextcloud/data/appdata_ocjrumk06tlj/backup/20240430015156-differential-HPRNz4QUGnu9jWN
9,7G    /datadisk/nginx/nextcloud/data/appdata_ocjrumk06tlj/backup/20240503013608-differential-Qhri1qU2q3ybgNL
202G   /datadisk/nginx/nextcloud/data/appdata_ocjrumk06tlj/backup/20240504002610-full-4Ys336x2mazzHsk
184G   /datadisk/nginx/nextcloud/data/appdata_ocjrumk06tlj/backup/20240505182107-full-dGq71cdoZ18CEXo

J’ai donc fait le ménage :

# rm -rf /datadisk/nginx/nextcloud/data/appdata_ocjrumk06tlj/backup/20240504002610-full-4Ys336x2mazzHsk
# rm -rf /datadisk/nginx/nextcloud/data/appdata_ocjrumk06tlj/backup/*-differential-*

J’ai pas trouvé de commande pour le faire autrement.
J’ai du mal à comprendre comment je peux avoir 470 Go de backup alors que je dois avoir 140 Go de données.
Pour finir j’ai lancé :

# sudo -u www-data php /usr/share/nginx/nextcloud/occ  files:scan --all
....
+---------+--------+-----+---------+---------+--------+--------------+
| Folders | Files  | New | Updated | Removed | Errors | Elapsed time |
+---------+--------+-----+---------+---------+--------+--------------+
| 19641   | 277574 | 0   | 382     | 0       | 0      | 00:26:36     |
+---------+--------+-----+---------+---------+--------+--------------+
...
# sudo -u www-data php /usr/share/nginx/nextcloud/occ trashbin:cleanup --all-users

Nextcloud : Blocage suite à une mise à jours : 28.0.2 => 28.0.3

En passant

J’ai du faire :

# sudo -u www-data php /usr/share/nginx/nextcloud/occ maintenance:mode --off
# sudo -u www-data php /usr/share/nginx/nextcloud/occ maintenance:repair
# sudo -u www-data php /usr/share/nginx/nextcloud/occ maintenance:mimetype:update-db
# sudo -u www-data php /usr/share/nginx/nextcloud/occ db:add-missing-indices
# sudo -u www-data php /usr/share/nginx/nextcloud/occ db:convert-filecache-bigint
# sudo -u www-data php /usr/share/nginx/nextcloud/occ db:add-missing-primary-keys
# sudo systemctl restart nginx.service
# sudo systemctl restart php8.1-fpm.service

Et c’est reparti …