This script can be ran to backup a mysql database to cloud storage
- Node JS (Latest LTS is good, tested in 14.x)
- MariaDB (MySQL)
I use nano, alternatives are avalible. Paste the script below into the file when nano or your editor of choice opens and save (after adding in your information in missing areas)
npm i -g linode-object-upload
mkdir /backups
nano /backups/mkbackup.sh
The below cron job will run every six hours, you are able to edit. Try searching for cron calculators if you don't know the syntax.
To open crontab do sudo crontab-e
then add the following line
10 */6 * * * /bin/bash /backups/mkbackup.sh