https://paquita.masto.host/polkillas

Nextcloud 19 en la Raspberry Pi. Usando emojis

Traduzco la documentación oficial de Nextcloud para este punto.

Asegúrate de hacer una copia de seguridad de la base de datos antes de realizar esta actualización./important]

Para usar emojis (caritas basadas en texto) en tu servidor Nextcloud con una base de datos MySQL/MariaDB, hay que retocar un poco la instalación.

 

  1. Asegúrate de que tu servidor MySQL tiene la siguiente configuración de InnoDB:
    [mysqld]
    innodb_file_per_table=1
    
  1. Reinicia el servidor MySQL si has tenido que cambiar la configuración en el paso 1.

Ahora puedes verificar que el cambio ha tenido lugar:

SHOW VARIABLES LIKE 'innodb_file_per_table';

El resultado debería ser parecido a este:

mysql> SHOW VARIABLES LIKE 'innodb_file_per_table';
+-----------------------+-------+
| Variable_name         | Value |
+-----------------------+-------+
| innodb_file_per_table | ON    |
+-----------------------+-------+
1 row in set (0.00 sec)
  • Open a shell, change dir (adjust /var/www/nextcloud to your nextcloud location if needed), and put your nextcloud instance in maintenance mode, if it isn’t already:
    $ cd /var/www/nextcloud
    $ sudo -u www-data php occ maintenance:mode --on
    
  1. Change your databases character set and collation:
ALTER DATABASE nextcloud CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
  • Set the mysql.utf8mb4 config to true in your config.php:
    $ sudo -u www-data php occ config:system:set mysql.utf8mb4 --type boolean --value="true"
    

Convert all existing tables to the new collation by running the repair step:

$ sudo -u www-data php occ maintenance:repair

Note

This will also change the ROW_FORMAT to DYNAMIC for your tables.

  1. Disable maintenance mode:
    $ sudo -u www-data php occ maintenance:mode --off
    

Now you should be able to use Emojis in your file names, calendar events, comments and many more.

Note

Also make sure your backup strategy still work. If you use mysqldump make sure to add the --default-character-set=utf8mb4 option. Otherwise your backups are broken and restoring them will result in ? instead of the emojis, making files inaccessible.

Deja un comentario

Este sitio usa Akismet para reducir el spam. Aprende cómo se procesan los datos de tus comentarios.