Backup DB + data

#!/usr/bin/env bash

# Backup Database Moodle (Morning, After noon into files and MidDay to a backup DB inside MySQL)
01 05 * * *  root mysqldump  -udb_user -pdb_user_password -hlocalhost db_name | gzip  > /backup/db_name-`date +\%Y-\%m-\%d-\%H`.sql.gz

# Keep 10 SQL database backups of economy (last 5 backups of economy)
2 2 * * * root find /backup/* -mtime +5 -exec rm {} \;
# Backup files  (Morning, After noon into files and MidDay to a backup DB inside MySQL)

30 5 * * * root  zip -r /backup/files/moodledata`date +\%Y-\%m-\%d-\%H-\%M-\%S`.zip /var/www/moodledata

# Keep 5 instanse backups of moodledata (last 5 backups of davidson-net)
10 2 * * * root find /backup/wpfiles/* -mtime +5 -exec rm {} \;

Moodle – Install Unoconv on Ubuntu

On Ubuntu 16.04 and Ubuntu 18

sudo apt-get install python3-minimal -y 
sudo apt-get install graphviz -y 
sudo apt-get install ghostscript -y 
sudo apt-get install du -y 
sudo apt-get install aspell -y 
sudo apt-get install dot -y 
sudo apt-get install unoconv -y

Source Moodle Doc: https://docs.moodle.org/35/en/Universal_Office_Converter_(unoconv)

Bash Script:

https://github.com/devlionco/bashscripts/blob/master/install_unoconv_moodle_ubunut_18.sh