Automatic GLPI Backup Script

backup_glpi.sh:

#!/bin/bash
# Automatic GLPI Backup Script

#over-write backups after 7 days

keep_day=7

#mysql dump to backup folder

mysqldump --defaults-extra-file=/path/to/auth.cnf glpi | gzip > /var/backups/backup_glpi_$(date +"%Y_%m_%d_%H_%M").sql.gz

#tar /var/www/html/glpi to backup folder

tar -czvf /location_to_save_backup/backup_name_$(date +"%Y_%m_%d_%H_%M").tar.gz /var/www/html/glpi

For full use for the script go to Automate GLPI Backups

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top