BressenReportScript

From RdiffBackupWiki

Jump to: navigation, search

written some crude but functional scripts to run my backups and mail me important stuff. Below is the script that strips out unimportant stuff from rdiff-backup output. It is invoked as follows:

<pre>

 # run the backups and shove output into a file
 /some/path/backup-script >/var/logs/backups/backup-`date +%Y-%m-%d` 2>&1
 # run the backup-report generator and mail the output someplace
 /some/path/backup-report /var/logs/backups/backup-`date +%Y-%m-%d` || 
   mail -s "`hostname` Backup Report `date +%Y-%m-%d`" 

myaddress@mydomain.foo

 # compress the output file
 bzip2 /var/logsbackups/backup-`date +%Y-%m-%d`

</pre>

I typically invoke rdiff-backup at -v6.

Here's the report generator:

<pre>

  1. ====/bin/sh

=

  1. backup-report
  2. a crude backup report munger
  3. akb 05-jun-2003
  4. most recent mods 19-jan-04.

grep -v "^Executing ssh -C" $1 ||

    1. rdiff-backup 0.13.x...

grep -v "^ Access control lists.*Off" || grep -v "^ Characters needing quoting.*" || grep -v "^ Directory inc permissions.*On" || grep -v "^ Extended attributes.*Off" || grep -v "^ Hard linking.*On" || grep -v "^ Mac OS X Finder information.*Off" || grep -v "^ Mac OS X style resource forks.*Off" || grep -v "^ Ownership changing.*On" || grep -v "^ fsync() directories.*On" || grep -v "^########## /" || grep -v "^--------------------------------


" ||

grep -v "^ACLs not supported on filesystem at /" || grep -v "^Detected abilities for destination (read/write) file system:" |- | grep -v "^Detected abilities for source (read only) file system:" || grep -v "^Removing directory .*" || grep -v "^Starting increment operation . to ." || grep -v "^Unable to import module posix1e from pylibacl package." || grep -v "^Unable to import module xattr. EAs not supported on filesystem at /.*" || grep -v "^Hard linking . to ." ||

    1. rdiff-backup 0.12.x and 0.13.x

grep -v "^Cleaning up" || grep -v "^Incrementing mirror file" || grep -v "^Making directory .*" || grep -v "^Processing changed file .*" || grep -v "^Regular copying" || grep -v "^Touching mirror marker"

</pre>

Sua chua laptop ghd iv styler so good

Personal tools