I personally don't like the fact that you have to modify the code of the scripts to backup and restore local external storage and to restore the database without multibyte support.
Although I guess that just removing comment marks is straightforward and the script is mostly used by system administrators, it is a possible source for errors.
I patched the scripts so that they check if the variable nextcloudLocalExternalDataDir exists. If it exists, they do the job.
I also introduced a new config variable dbNoMultibyte in the restore script. If the variable exists and is set to true, the database is created without multibyte support.
Furthermore, I replaced some whitespaces with tabs and fixed the message when restoring local external storage.
I tested this on Ubuntu 20.04.3 Server and on Linux Mint 19.3 (Ubuntu 18.04).