Skip to content

A script for mirroring directories to a (removable) backup drive

License

Notifications You must be signed in to change notification settings

lairdm/datamirror

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

datamirror

Background

This script has evolved in bursts over the paste 20 years as my home data storage setup changed. This step is a complete rewrite to add some additional flexibility. I'm sure there's ways this could be greatly improved, but it works for my purposes.

The primary goal has always been to rsync a set of directories to a portable hard drive I could swap. Because most of the portable hard drives were smaller than the original sources I needed a way to selectively mirror subsets of data.

This whole script should probably be rewritten in Python and use a yaml config, but... maybe I'll get to that in another decade.

Usage

scripts/backup.sh [/path/to/configs] [false]

Both parameters are optional, the first is the path to the directory containing the conf and paths directories. The second is true/false on if the backup directory should be unmounted when finished (defaults to false).

Configuration

conf/settings contains the source and destination rsync paths.

paths is a directory of path suffixes in the source path to rsync. They're zero size files that just say which paths in source to rsync to destination.

paths/suffix.exclude rsync patterns to exclude

paths/suffix.path to override the source prefix for a particular directory

About

A script for mirroring directories to a (removable) backup drive

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages