Skip to content

simple rsync backup script for backing up all your data to an external drive / remote server

License

Notifications You must be signed in to change notification settings

maknesium/rsync-backup-script

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

rsync-backup-script

This bash script will help you to backup your data on *nix sytems (like MacOS X, Linux, BSD, Solaris, ...) with the help of the rsync tool.

The script is highly configurable and can be extended in many ways.

Personally, I use the backup script to

  1. get database and file backups from some servers I run on the internet
  2. backup important data from my laptop's SSD to it's internal hard drive (in case either one fails one day)
  3. backup all files from my laptop to my encrypted USB hard drive

see: IMAGE ALT TEXT HERE

Installation

Drop the script to a folder in your path e.g. /usr/local/sbin or /usr/local/bin or /usr/sbin or /usr/bin

You can find out which directories are in your path by entering echo $PATH on the command line interface (CLI).

Prerequisites

  • bash (tested with version )
  • rsync (tested with version )
  • cron or other job scheduler if you want to schedule automatic backups

Most shared hosting machines will cover the above.

Install rsync on debian: apt-get install rsync Install rsync on RHEL / Centos: yum -y install rsync

Cronjob (optional) for automatic regular backups

On Unix/Linux based systems, you'd use cron to execute backup script if you don't want to do it manually. E.g. if our backup script should be run once a week (like every sunday night at 23:55h or 11.55pm), the cron file would have an entry like this:


55 23 * * 0  backup.sh

About

simple rsync backup script for backing up all your data to an external drive / remote server

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages