Skip to content

Latest commit

 

History

History

cron-backup

cron-backup Docker Container Usage

This instance provides backup support for the Nginx, Node-red and Grafana containers and pushed the backed up data to S3-compatible storage.

Shell script

For backing up the directory data

Scheduling backup using crontab

The following backup jobs are added to run at specific time.

# echo new cron into cron file
{ 
    echo "35 6 * * * /bin/bash -l -c '/bin/nodered_backup.sh'"
    echo "35 7 * * * /bin/bash -l -c '/bin/grafana_backup.sh'" 
    echo "35 8 * * * /bin/bash -l -c '/bin/nginx_backup.sh'"
} >> mycron

Mail Alert

The above backup shell scripts were configured to send mail for the both successful/unsuccessful run.