# Backup Scripts Backup Scripts gives ideas do generate backup of webservers and databases for backup purposes with option to send it to BackBlaze buckets configured on Rclone, also check BackBlaze repositories for outdated buckets and send email messages when find outdated buckets to you through Amazon SES. You can change the script to fit it for other backup storage services and messaging. [![Stars](https://img.shields.io/github/stars/ivancarlosti/bkpscripts?label=⭐%20Stars&color=gold&style=flat)](https://github.com/ivancarlosti/bkpscripts/stargazers) [![Watchers](https://img.shields.io/github/watchers/ivancarlosti/bkpscripts?label=Watchers&style=flat&color=red)](https://github.com/sponsors/ivancarlosti) [![Forks](https://img.shields.io/github/forks/ivancarlosti/bkpscripts?label=Forks&style=flat&color=ff69b4)](https://github.com/sponsors/ivancarlosti) [![GitHub commit activity](https://img.shields.io/github/commit-activity/m/ivancarlosti/bkpscripts?label=Activity)](https://github.com/ivancarlosti/bkpscripts/pulse) [![GitHub Issues](https://img.shields.io/github/issues/ivancarlosti/bkpscripts?label=Issues&color=orange)](https://github.com/ivancarlosti/bkpscripts/issues) [![License](https://img.shields.io/github/license/ivancarlosti/bkpscripts?label=License)](LICENSE) [![GitHub last commit](https://img.shields.io/github/last-commit/ivancarlosti/bkpscripts?label=Last%20Commit)](https://github.com/ivancarlosti/bkpscripts/commits) [![Security](https://img.shields.io/badge/Security-View%20Here-purple)](https://github.com/ivancarlosti/bkpscripts/security) [![Code of Conduct](https://img.shields.io/badge/Code%20of%20Conduct-2.1-4baaaa)](https://github.com/ivancarlosti/bkpscripts?tab=coc-ov-file) [![GitHub Sponsors](https://img.shields.io/github/sponsors/ivancarlosti?label=GitHub%20Sponsors&color=ffc0cb)][sponsor] ## Instructions * Setup `rclone.sh` file to run backup of webserver and MariaDB/MySQL or Postgres database * Setup `checkbackup.sh` file to check outdated buckets * Setup `bkppostgres.sh` file to backup entire Postgres database on a Docker * Run `chmod +x scriptfile.sh` to make the script executable * Run `crontab -e` to add execution line to run periodically * Suggestion to run script `/home/username/scriptfile.sh` everyday at 02:00: ``` 0 2 * * * cd /home/username; ./scriptfile.sh >/dev/null 2>&1 ``` #### Set password DB on file if needed to setup MariaDB/MySQL backup * Write and edit file `.dbpassword.cnf` * Setup permission running `chmod 0600 .dbpassword.cnf` #### Check the articles below for additional information (Google Translator may be required) * [Setting up a script to notify by email that a repository in Rclone is without a recent backup](https://suporte.ivancarlos.com.br/hc/pt-br/articles/25861271868301) * [Configuring Rclone to send backup to its destination](https://suporte.ivancarlos.com.br/hc/pt-br/articles/25731464664461) ## Requirements * Linux Server * MariaDB/MySQL or Postgres database if want backup of it * Rclone properly configured if want offsite backup * BackBlaze bucket if want offsite backup on BackBlaze --- ## 🧑‍💻 Consulting and technical support * For personal support and queries, please submit a new issue to have it addressed. * For commercial related questions, please [**contact me**][ivancarlos] for consulting costs. ## 🩷 Project support | If you found this project helpful, consider | | :---: | [**buying me a coffee**][buymeacoffee] or [**supporting me on Patreon**][patreon] |Thanks for your support, it is much appreciated!| [ivancarlos]: https://ivancarlos.me [buymeacoffee]: https://www.buymeacoffee.com/ivancarlos [patreon]: https://patreon.com/ivancarlos