Simple Bash Backup Script

I just started a backup script to maintain a simple configurable, daily backup script for linux that holds 1 month history of backuped data and has host dependant configuration to update the script in a central repository.

I published it under github:


  • logging of all output
  • configuration file in /etc/backup.conf to override default values
  • script to use functions defined in
  • simulation with debug mode ( debug)
  • non changed base scripts for centralized maintenance – just git pull to get the latest version
  • postgresql+mysql database backup support (dump)
  • folder support – using rsync to keep io as low as possible
  • create tgz from files/folders to specified target
  • rsync to remote backup targets
  • one hard-linked backup folder per day to keep io and disk capacity usage low
  • untouched folders without any rotation – rotation is done by using the actual day of month
  • handling of old backups if last month did not overwrite all folders – needed as it uses dom for rotation and months don’t have equal length

Leave a Comment