Can you please share your backup strategies for linux? I’m curious to know what tools you use and why?How do you automate/schedule backups? Which files/folders you back up? What is your prefered hardware/cloud storage and how do you manage storage space?
Example of a Bash script that performs the following tasks
Example script:
Description:
curl
command to check if the site is available.df
andawk
to check disk usage. If the threshold (90%) is exceeded, a notification is sent.tar
command archives and compresses the directories specified in theTARGET_DIRS
variable.mail
.How to use:
cron
to run on a regular basis:Example to run every day at 00:00: