Mitto CMD job that backs up all job configs

You can easily make a cmd job that will back up your job configs (stored in /var/mitto/conf)

Create a new cmd job and enter the following commands:

exec 1>/var/mitto/data/log-backup.txt 2>&1
mkdir -p /var/mitto/data/backup_`date --date=today +%Y_%m_%d`
cp /var/mitto/conf/*.json /var/mitto/data/backup_`date --date=today +%Y_%m_%d`/
zip -j -r /var/mitto/data/backup_`date --date=today +%Y_%m_%d`.zip /var/mitto/data/backup_`date --date=today +%Y_%m_%d`/*
rm -rfv /var/mitto/data/backup_`date --date=today +%Y_%m_%d`/

Running the job will create a zip file named backup_{today's date}.zip in the files page. It will also write to a log file visible using the mitto api at: https://{MITTO_URL}/api/v2/files/log-backup.txt

NOTE: If you see an error about zip not being found, you will need to have zip installed.