rsync for backup considered dangerous?

You are doing the first part right, get the data off of the hardware scanner in the event something happens to it. The second part should be that you take backups of your intermediary backup location. So in other words you either should setup a secondary rsync job to another final resting/backup place or actually have a backup program come in and take a periodic copy for a more permanent/archival purpose.

Often you will do two things to preserve data...

  1. Take the immediate disk to disk backup (Scanner using rsync)
  2. Take an archival backup disk to tape, or some newer methods just another disk to disk or disk to web mechanism.

This ensures your scanner data is protected and you have long term archives of everything that happens. Treat your disk to disk as temporary backup until the archival run can complete, your archive is sacred.


rsync with --link-dest option might be usefull. It creates a directory for every backup-run. Files that are unchanged since last run are hardlinked to the already present versions. So you have a complete normal folder-structure from every run (you can directly browse through it) without duplicating the unchanged data.

I use the following kind of snippets for > 1 TB since years for daily backups. a linux-gui-tool that uses rsync in that way is backintime http://backintime.le-web.org/

#!/bin/bash

# when saving this as "rsync-history" call it with arguments
# sh rsync-history user@host-to-be-backed-up:/directory-on-host/    where-to-save-the-backup/ 

source=$1
target_fileprefix="$2""$source"

#keep N generations
bigger=100


rm -vrf "$target_fileprefix""$bigger"

#move 1 to 2, 2 to 3...
while [ $bigger -gt 0 ]
do
smaller=$(($bigger-1))      
mv  -f "$target_fileprefix""$smaller"\
"$target_fileprefix""$bigger" 2>>/dev/null
bigger=$(($bigger-1))
done

mkdir -p "$target_fileprefix""0" 

rsync \
-a --whole-file --delete \
--link-dest=$target_fileprefix"1"/.  $source. $target_fileprefix"0"/.