Wiki

Clone wiki

BackupMaster / Home

Backupmaster

Author: Droidzone

What is it?

It's a bash script which can be run on a server, to backup server files and mysql databases. It can be integrated in cron jobs to automate scheduled backups of files, databases or both. It can exclude unnecessary files and databases. It will notify the specified email address when the job is over. It has testing functions, backup and remote push or sync functions.

Features:

  • Backup folders - bzip2 archives by default
  • Batch mysql database dumps of all databases on server. Exclusions may be specified. Databses may be compressed to save space.
  • Remote push - It can send files to a remote ftp server. Dropbox and other cloud service support may be implemented later.
  • Remote sync - This option remote syncs two folders, one on the server with another one on the ftp server. No need of rsync/scp.

Requirements:

  • Root shell access
  • lftp - for remote push/sync (Will be automatically installed if not found)
  • mutt - for email notifications (Will be automatically installed if not found)
  • Root mysql password for mysql dumps

Optional arguments: (Can work in interactive mode too)

The list of options can be invoked with "fullbackup --help"

  • --nodatabases OR -nd Skip backup of databases (Default:On)
  • --nofiles OR -nf Skip backup of files (Default:On)
  • --remotepush OR -p Do a remote push (Default:Off)
  • --help OR -h Print this help message
  • --test OR -t Test that task is executed. Only email notification occurs,
  • especially useful for testing that the script runs when set as a cron job.
  • --testpart Tests a specific pre-determined function.
  • -c Cron mode flag. Set this to flag as run by cron
  • --authfile=/path/to/authfile This file can overriden any defined parameters of .conf/.dat files. May be helpful in using a seperate file with auth details of a secondary or tertiary backup server.

Updated