Sebastian Mogilowskis Blog

Just another blog about administration, linux and other stuff

November, 2015

Simple Backup Script with logrotate

A simple backup script using logrotate to save multiple backups. I use a NFS storage mounted via autofs as backup location. Database Backup is optional. #!/bin/bash # Backup Target (Network Share mostly via autofs) BACKUP_DIR=”/tmp/foo” # Number of Backups BACKUP_NUM=3 # Directories to backup SOURCE_DIRS=”/var/www /var/log /etc” # Backup savelog -n -l -q -c $BACKUP_NUM […]