ReinerNippes / nextcloud_on_docker

Run Nextcloud in Docker Container on various Linux Hosts
MIT License
203 stars 48 forks source link

Backup - Nextcloud - Enabling MySQL 4-byte support -> adjust mysqldump flags #27

Open james-cook opened 4 years ago

james-cook commented 4 years ago

Check: https://docs.nextcloud.com/server/16/admin_manual/configuration_database/mysql_4byte_support.html

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.

So, if the generated nextcloud config.php file contains: 'mysql.utf8mb4' => true,

then the mysqldump command should contain the additional flag: --default-character-set=utf8mb4

See: \roles\prep_backup\templates\backup_nextcloud.sh.j2