Skip to content

todd-dsm/rsync-backups

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

rsync-backups

Various reusable rsync scripts for Linux and macOS.

You are more than welcome to use thist stuff to backup your system(s), I do. Here's what you have to know:

  1. It's not done yet; only the macOS backup is deemed "solid" and even that can change.

  2. I backup to a USB 3 drive available at /Volumes/storage/.

  • Anyone that uses this will as well.

  • To determine the name of your backup volume (backupVol) just plug it in and:

ls -l /Volumes/ you'll see everything listed under that directory. Let's say it's called storage. You would set that by: (for example)

Using sed to replace 'usbDrive' with the name of your volume:

sed -i '/backupVol/ s/storage/myVolumeName/g' sources/macos_backups.sh

  1. You'll want to specify a directory (backupDir) within that volume.

mkdir -p /Volumes/storage/backups

Then set that in the same file as well; use sed to replace 'backups' with your backup directory name.

sed -i '/backupDir/ s/backups/myDirName/g' sources/macos_backups.sh

After that you can just execute the script based on the OS below. It goes pretty quick. Don't be alarmed - it actually worked :-)

macOS

./install-backups.sh --macos

Linux (Workstation)

./install-backups.sh --linux

Server (Linux)

./install-backups.sh --server

The output in the terminal will tell you the rest.

The crontab

To edit the chrontab file: crontab -e

Paste this into the crontab:

@daily "$HOME/.config/rsync/backups" > /dev/null 2>&1

If you don't change anything you'll be:

  • backing-up 7 days a week at midnight

  • the first one is full, subsequent back-ups are incremental

  • The latest stuff is always in the 'current' directory; everything you need to recover will be there. Here are some helpful resources:

Cheers,

TT

About

various reusable rsync scripts

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages