Tutorial / diciembre 25, 2021

Actualizar NextCloud desde la línea de comandos

Nextcloud es una serie de programas cliente-servidor que permiten la creación de servicios de alojamiento de archivos. Su funcionalidad es similar al software Dropbox, aunque Nextcloud en su totalidad de código abierto. Nextcloud permite a los usuarios crear servidores privados. Su modelo de desarrollo abierto permite añadir y/o modificar la funcionalidad del software del servidor en forma de aplicaciones.

A continuación vamos a proceder a actualizar NextCloud desde la línea de comandos. Este tutorial se está realizando sobre Debian 11, pero el procedimiento es exactamente el mismo para cualquier distribución de GNU/Linux.

Actualización de NextCloud

Lo primero que haremos será posicionarnos a la raíz de la instalación de NextCloud. En mi caso, se encuentra dentro de /var/www/vhosts/midominio/www.

Dentro de ese directorio, veremos que hay muchos ficheros. Deberemos de ejecutar lo siguiente con el usuario nextcloud:

sudo -u nextcloud php updater/updater.phar

Y este comando muestra la siguiente salida:

Nextcloud Updater - version: v20.0.0beta4-11-g68fa0d4

Current version is 21.0.3.

Update to Nextcloud 21.0.7 available. (channel: "stable")
Following file will be downloaded automatically: https://download.nextcloud.com/server/releases/nextcloud-21.0.7.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

Start update? [y/N] y

Para iniciar la instalación pulsaremos la tecla y:

Info: Pressing Ctrl-C will finish the currently running step and then stops the updater.

[✔] 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

Update of code successful.

Should the "occ upgrade" command be executed? [Y/n] y
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
2021-11-25T10:58:04+00:00 Setting log level to debug
2021-11-25T10:58:04+00:00 Repair step: Repair MySQL collation
2021-11-25T10:58:04+00:00 Repair info: All tables already have the correct collation -> nothing to do
2021-11-25T10:58:04+00:00 Repair step: Repair SQLite autoincrement
2021-11-25T10:58:04+00:00 Repair step: Copy data from accounts table when migrating from ownCloud
2021-11-25T10:58:04+00:00 Repair step: Drop account terms table when migrating from ownCloud
2021-11-25T10:58:04+00:00 Updating database schema
2021-11-25T10:58:06+00:00 Updated database
2021-11-25T10:58:06+00:00 Updating <files_external> ...
2021-11-25T10:58:06+00:00 Updated <files_external> to 1.12.1
2021-11-25T10:58:06+00:00 Updating <workflowengine> ...
2021-11-25T10:58:07+00:00 Repair step: Populating added database structures for workflows
2021-11-25T10:58:07+00:00 Updated <workflowengine> to 2.3.1
2021-11-25T10:58:07+00:00 Updating <files_pdfviewer> ...
2021-11-25T10:58:07+00:00 Updated <files_pdfviewer> to 2.1.1
2021-11-25T10:58:07+00:00 Checking for update of app accessibility in appstore
2021-11-25T10:58:08+00:00 Checked for update of app "accessibility" in appstore 
2021-11-25T10:58:08+00:00 Checking for update of app activity in appstore
2021-11-25T10:58:08+00:00 Checked for update of app "activity" in appstore 
2021-11-25T10:58:08+00:00 Checking for update of app apporder in appstore
2021-11-25T10:58:08+00:00 Checked for update of app "apporder" in appstore 
2021-11-25T10:58:08+00:00 Checking for update of app calendar in appstore
2021-11-25T10:58:08+00:00 Checked for update of app "calendar" in appstore 
2021-11-25T10:58:08+00:00 Checking for update of app cloud_federation_api in appstore
2021-11-25T10:58:08+00:00 Checked for update of app "cloud_federation_api" in appstore 
2021-11-25T10:58:08+00:00 Checking for update of app comments in appstore
2021-11-25T10:58:08+00:00 Checked for update of app "comments" in appstore 
2021-11-25T10:58:08+00:00 Checking for update of app contacts in appstore
2021-11-25T10:58:08+00:00 Checked for update of app "contacts" in appstore 
2021-11-25T10:58:08+00:00 Checking for update of app contactsinteraction in appstore
2021-11-25T10:58:08+00:00 Checked for update of app "contactsinteraction" in appstore 
2021-11-25T10:58:08+00:00 Checking for update of app cookbook in appstore
2021-11-25T10:58:08+00:00 Checked for update of app "cookbook" in appstore 
2021-11-25T10:58:08+00:00 Checking for update of app dashboard in appstore
2021-11-25T10:58:08+00:00 Checked for update of app "dashboard" in appstore 
2021-11-25T10:58:08+00:00 Checking for update of app dav in appstore
2021-11-25T10:58:08+00:00 Checked for update of app "dav" in appstore 
2021-11-25T10:58:08+00:00 Checking for update of app encryption in appstore
2021-11-25T10:58:08+00:00 Checked for update of app "encryption" in appstore 
2021-11-25T10:58:08+00:00 Checking for update of app federatedfilesharing in appstore
2021-11-25T10:58:08+00:00 Checked for update of app "federatedfilesharing" in appstore 
2021-11-25T10:58:08+00:00 Checking for update of app federation in appstore
2021-11-25T10:58:08+00:00 Checked for update of app "federation" in appstore 
2021-11-25T10:58:08+00:00 Checking for update of app files in appstore
2021-11-25T10:58:08+00:00 Checked for update of app "files" in appstore 
2021-11-25T10:58:08+00:00 Checking for update of app files_external in appstore
2021-11-25T10:58:08+00:00 Checked for update of app "files_external" in appstore 
2021-11-25T10:58:08+00:00 Checking for update of app files_pdfviewer in appstore
2021-11-25T10:58:08+00:00 Checked for update of app "files_pdfviewer" in appstore 
2021-11-25T10:58:08+00:00 Checking for update of app files_rightclick in appstore
2021-11-25T10:58:08+00:00 Checked for update of app "files_rightclick" in appstore 
2021-11-25T10:58:08+00:00 Checking for update of app files_sharing in appstore
2021-11-25T10:58:08+00:00 Checked for update of app "files_sharing" in appstore 
2021-11-25T10:58:08+00:00 Checking for update of app files_trashbin in appstore
2021-11-25T10:58:08+00:00 Checked for update of app "files_trashbin" in appstore 
2021-11-25T10:58:08+00:00 Checking for update of app files_versions in appstore
2021-11-25T10:58:08+00:00 Checked for update of app "files_versions" in appstore 
2021-11-25T10:58:08+00:00 Checking for update of app files_videoplayer in appstore
2021-11-25T10:58:08+00:00 Checked for update of app "files_videoplayer" in appstore 
2021-11-25T10:58:08+00:00 Checking for update of app firstrunwizard in appstore
2021-11-25T10:58:08+00:00 Checked for update of app "firstrunwizard" in appstore 
2021-11-25T10:58:08+00:00 Checking for update of app groupfolders in appstore
2021-11-25T10:58:08+00:00 Checked for update of app "groupfolders" in appstore 
2021-11-25T10:58:08+00:00 Checking for update of app logreader in appstore
2021-11-25T10:58:08+00:00 Checked for update of app "logreader" in appstore 
2021-11-25T10:58:08+00:00 Checking for update of app lookup_server_connector in appstore
2021-11-25T10:58:08+00:00 Checked for update of app "lookup_server_connector" in appstore 
2021-11-25T10:58:08+00:00 Checking for update of app nextcloud_announcements in appstore
2021-11-25T10:58:08+00:00 Checked for update of app "nextcloud_announcements" in appstore 
2021-11-25T10:58:08+00:00 Checking for update of app notifications in appstore
2021-11-25T10:58:08+00:00 Checked for update of app "notifications" in appstore 
2021-11-25T10:58:08+00:00 Checking for update of app oauth2 in appstore
2021-11-25T10:58:08+00:00 Checked for update of app "oauth2" in appstore 
2021-11-25T10:58:08+00:00 Checking for update of app password_policy in appstore
2021-11-25T10:58:08+00:00 Checked for update of app "password_policy" in appstore 
2021-11-25T10:58:08+00:00 Checking for update of app photos in appstore
2021-11-25T10:58:08+00:00 Checked for update of app "photos" in appstore 
2021-11-25T10:58:08+00:00 Checking for update of app privacy in appstore
2021-11-25T10:58:08+00:00 Checked for update of app "privacy" in appstore 
2021-11-25T10:58:08+00:00 Checking for update of app provisioning_api in appstore
2021-11-25T10:58:08+00:00 Checked for update of app "provisioning_api" in appstore 
2021-11-25T10:58:08+00:00 Checking for update of app recommendations in appstore
2021-11-25T10:58:08+00:00 Checked for update of app "recommendations" in appstore 
2021-11-25T10:58:08+00:00 Checking for update of app serverinfo in appstore
2021-11-25T10:58:08+00:00 Checked for update of app "serverinfo" in appstore 
2021-11-25T10:58:08+00:00 Checking for update of app settings in appstore
2021-11-25T10:58:08+00:00 Checked for update of app "settings" in appstore 
2021-11-25T10:58:08+00:00 Checking for update of app sharebymail in appstore
2021-11-25T10:58:08+00:00 Checked for update of app "sharebymail" in appstore 
2021-11-25T10:58:08+00:00 Checking for update of app support in appstore
2021-11-25T10:58:08+00:00 Checked for update of app "support" in appstore 
2021-11-25T10:58:08+00:00 Checking for update of app survey_client in appstore
2021-11-25T10:58:08+00:00 Checked for update of app "survey_client" in appstore 
2021-11-25T10:58:08+00:00 Checking for update of app systemtags in appstore
2021-11-25T10:58:08+00:00 Checked for update of app "systemtags" in appstore 
2021-11-25T10:58:08+00:00 Checking for update of app tasks in appstore
2021-11-25T10:58:08+00:00 Checked for update of app "tasks" in appstore 
2021-11-25T10:58:08+00:00 Checking for update of app text in appstore
2021-11-25T10:58:08+00:00 Checked for update of app "text" in appstore 
2021-11-25T10:58:08+00:00 Checking for update of app theming in appstore
2021-11-25T10:58:08+00:00 Checked for update of app "theming" in appstore 
2021-11-25T10:58:08+00:00 Checking for update of app theming_customcss in appstore
2021-11-25T10:58:08+00:00 Checked for update of app "theming_customcss" in appstore 
2021-11-25T10:58:08+00:00 Checking for update of app twofactor_backupcodes in appstore
2021-11-25T10:58:08+00:00 Checked for update of app "twofactor_backupcodes" in appstore 
2021-11-25T10:58:08+00:00 Checking for update of app updatenotification in appstore
2021-11-25T10:58:08+00:00 Checked for update of app "updatenotification" in appstore 
2021-11-25T10:58:08+00:00 Checking for update of app user_status in appstore
2021-11-25T10:58:08+00:00 Checked for update of app "user_status" in appstore 
2021-11-25T10:58:08+00:00 Checking for update of app viewer in appstore
2021-11-25T10:58:08+00:00 Checked for update of app "viewer" in appstore 
2021-11-25T10:58:08+00:00 Checking for update of app weather_status in appstore
2021-11-25T10:58:08+00:00 Checked for update of app "weather_status" in appstore 
2021-11-25T10:58:08+00:00 Checking for update of app workflowengine in appstore
2021-11-25T10:58:08+00:00 Checked for update of app "workflowengine" in appstore 
2021-11-25T10:58:08+00:00 Repair step: Repair MySQL collation
2021-11-25T10:58:08+00:00 Repair info: All tables already have the correct collation -> nothing to do
2021-11-25T10:58:08+00:00 Repair step: Repair mime types
2021-11-25T10:58:08+00:00 Repair step: Clean tags and favorites
2021-11-25T10:58:08+00:00 Repair info: 0 tags of deleted users have been removed.
2021-11-25T10:58:08+00:00 Repair info: 0 tags for delete files have been removed.
2021-11-25T10:58:08+00:00 Repair info: 0 tag entries for deleted tags have been removed.
2021-11-25T10:58:08+00:00 Repair info: 0 tags with no entries have been removed.
2021-11-25T10:58:08+00:00 Repair step: Repair invalid shares
2021-11-25T10:58:08+00:00 Repair step: Move .step file of updater to backup location
2021-11-25T10:58:08+00:00 Repair info: .step file exists
2021-11-25T10:58:08+00:00 Repair info: .step-previous-update removed
2021-11-25T10:58:08+00:00 Repair info: .step file moved to .step-previous-update
2021-11-25T10:58:08+00:00 Repair step: Add move avatar background job
2021-11-25T10:58:08+00:00 Repair info: Repair step already executed
2021-11-25T10:58:08+00:00 Repair step: Add preview cleanup background jobs
2021-11-25T10:58:08+00:00 Repair step: Fix potential broken mount points
2021-11-25T10:58:08+00:00 Repair info: No mounts updated
2021-11-25T10:58:08+00:00 Repair step: Repair language codes
2021-11-25T10:58:08+00:00 Repair step: Install new core bundle components
2021-11-25T10:58:08+00:00 Repair step: Add log rotate job
2021-11-25T10:58:08+00:00 Repair step: Clear frontend caches
2021-11-25T10:58:08+00:00 Repair info: Image cache cleared
2021-11-25T10:58:08+00:00 Repair info: SCSS cache cleared
2021-11-25T10:58:08+00:00 Repair info: JS cache cleared
2021-11-25T10:58:08+00:00 Repair step: Clear every generated avatar on major updates
2021-11-25T10:58:08+00:00 Repair step: Add preview background cleanup job
2021-11-25T10:58:08+00:00 Repair step: Queue a one-time job to cleanup old backups of the updater
2021-11-25T10:58:08+00:00 Repair step: Cleanup invalid photocache files for carddav
2021-11-25T10:58:08+00:00 Repair step: Add background job to cleanup login flow v2 tokens
2021-11-25T10:58:08+00:00 Repair step: Remove potentially over exposing share links
2021-11-25T10:58:08+00:00 Repair info: No need to remove link shares.
2021-11-25T10:58:08+00:00 Repair step: Clear access cache of projects
2021-11-25T10:58:08+00:00 Repair step: Reset generated avatar flag
2021-11-25T10:58:08+00:00 Repair step: Keep legacy encryption enabled
2021-11-25T10:58:08+00:00 Repair step: Check encryption key format
2021-11-25T10:58:08+00:00 Repair step: Remove old dashboard app config data
2021-11-25T10:58:08+00:00 Repair step: Add job to cleanup the bruteforce entries
2021-11-25T10:58:08+00:00 Repair step: Queue a one-time job to check for user uploaded certificates
2021-11-25T10:58:08+00:00 Repair step: Repair DAV shares
2021-11-25T10:58:08+00:00 Repair step: Add background job to set the lookup server share state for users
2021-11-25T10:58:08+00:00 Starting code integrity check...
2021-11-25T10:58:13+00:00 Finished code integrity check
2021-11-25T10:58:13+00:00 Update successful
2021-11-25T10:58:13+00:00 Maintenance mode is kept active
2021-11-25T10:58:13+00:00 Resetting log level

Keep maintenance mode active? [y/N] y
Maintenance mode kept active

Finalmente, nos pedirá si queremos mantener activo el modo mantenimiento.

Actualizar las aplicaciones

Si queremos actualizar únicamente las aplicaciones de NextCloud, podemos usar el siguiente comando:

sudo -u nextcloud php occ upgrade

Y nos saldrá esta salida:

Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
Setting log level to debug
Turned on maintenance mode
Updating database schema
Updated database
Updating <groupfolders> ...
Updated <groupfolders> to 9.0.2
Updating <calendar> ...
Updated <calendar> to 2.3.2
Updating <contacts> ...
Updated <contacts> to 4.0.1
Updating <cookbook> ...
Updated <cookbook> to 0.9.2
Updating <tasks> ...
Updated <tasks> to 0.14.1
Updating <theming_customcss> ...
Updated <theming_customcss> to 1.9.0
Checking for update of app accessibility in appstore
Checked for update of app "accessibility" in appstore 
Checking for update of app activity in appstore
Checked for update of app "activity" in appstore 
Checking for update of app apporder in appstore
Checked for update of app "apporder" in appstore 
Checking for update of app calendar in appstore
Update app calendar from appstore
Checked for update of app "calendar" in appstore 
Checking for update of app cloud_federation_api in appstore
Checked for update of app "cloud_federation_api" in appstore 
Checking for update of app comments in appstore
Checked for update of app "comments" in appstore 
Checking for update of app contacts in appstore
Update app contacts from appstore
Checked for update of app "contacts" in appstore 
Checking for update of app contactsinteraction in appstore
Checked for update of app "contactsinteraction" in appstore 
Checking for update of app cookbook in appstore
Update app cookbook from appstore
Checked for update of app "cookbook" in appstore 
Checking for update of app dashboard in appstore
Checked for update of app "dashboard" in appstore 
Checking for update of app dav in appstore
Checked for update of app "dav" in appstore 
Checking for update of app encryption in appstore
Checked for update of app "encryption" in appstore 
Checking for update of app federatedfilesharing in appstore
Checked for update of app "federatedfilesharing" in appstore 
Checking for update of app federation in appstore
Checked for update of app "federation" in appstore 
Checking for update of app files in appstore
Checked for update of app "files" in appstore 
Checking for update of app files_external in appstore
Checked for update of app "files_external" in appstore 
Checking for update of app files_pdfviewer in appstore
Checked for update of app "files_pdfviewer" in appstore 
Checking for update of app files_rightclick in appstore
Checked for update of app "files_rightclick" in appstore 
Checking for update of app files_sharing in appstore
Checked for update of app "files_sharing" in appstore 
Checking for update of app files_trashbin in appstore
Checked for update of app "files_trashbin" in appstore 
Checking for update of app files_versions in appstore
Checked for update of app "files_versions" in appstore 
Checking for update of app files_videoplayer in appstore
Checked for update of app "files_videoplayer" in appstore 
Checking for update of app firstrunwizard in appstore
Checked for update of app "firstrunwizard" in appstore 
Checking for update of app groupfolders in appstore
Update app groupfolders from appstore
Checked for update of app "groupfolders" in appstore 
Checking for update of app logreader in appstore
Checked for update of app "logreader" in appstore 
Checking for update of app lookup_server_connector in appstore
Checked for update of app "lookup_server_connector" in appstore 
Checking for update of app nextcloud_announcements in appstore
Checked for update of app "nextcloud_announcements" in appstore 
Checking for update of app notifications in appstore
Checked for update of app "notifications" in appstore 
Checking for update of app oauth2 in appstore
Checked for update of app "oauth2" in appstore 
Checking for update of app password_policy in appstore
Checked for update of app "password_policy" in appstore 
Checking for update of app photos in appstore
Checked for update of app "photos" in appstore 
Checking for update of app privacy in appstore
Checked for update of app "privacy" in appstore 
Checking for update of app provisioning_api in appstore
Checked for update of app "provisioning_api" in appstore 
Checking for update of app recommendations in appstore
Checked for update of app "recommendations" in appstore 
Checking for update of app serverinfo in appstore
Checked for update of app "serverinfo" in appstore 
Checking for update of app settings in appstore
Checked for update of app "settings" in appstore 
Checking for update of app sharebymail in appstore
Checked for update of app "sharebymail" in appstore 
Checking for update of app support in appstore
Checked for update of app "support" in appstore 
Checking for update of app survey_client in appstore
Checked for update of app "survey_client" in appstore 
Checking for update of app systemtags in appstore
Checked for update of app "systemtags" in appstore 
Checking for update of app tasks in appstore
Update app tasks from appstore
Checked for update of app "tasks" in appstore 
Checking for update of app text in appstore
Checked for update of app "text" in appstore 
Checking for update of app theming in appstore
Checked for update of app "theming" in appstore 
Checking for update of app theming_customcss in appstore
Update app theming_customcss from appstore
Checked for update of app "theming_customcss" in appstore 
Checking for update of app twofactor_backupcodes in appstore
Checked for update of app "twofactor_backupcodes" in appstore 
Checking for update of app updatenotification in appstore
Checked for update of app "updatenotification" in appstore 
Checking for update of app user_status in appstore
Checked for update of app "user_status" in appstore 
Checking for update of app viewer in appstore
Checked for update of app "viewer" in appstore 
Checking for update of app weather_status in appstore
Checked for update of app "weather_status" in appstore 
Checking for update of app workflowengine in appstore
Checked for update of app "workflowengine" in appstore 
Starting code integrity check...
Finished code integrity check
Update successful
Turned off maintenance mode
Resetting log level

Ningún comentario “Actualizar NextCloud desde la línea de comandos”

Suscribirte
Notificarme
guest
0 Comments
Inline Feedbacks
View all comments

Utilizamos cookies propias y de terceros para mejorar nuestros servicios. Si continúa navegando, consideramos que acepta su uso. Doble clic sobre aquí para cerrar.