System Backup

Tools Needed

 * Hashdeep(WINDOWS/Linux)
 * cygwin/rsync(WINDOWS)
 * darwinports/hashdeep (OSX)
 * rsync (WINDOWS/OSX/Linux)

Linux
hashdeep is apart of the md5deep package. To install: sudo aptitude install md5deep

OSX
First Install http://darwinports.com/

After Darwin Ports are install install(instructions are about halfway down the page): http://md5deep.darwinports.com/

Windows
In order to use hashdeep via cygwin bash we need to add it to the WINDOWS path. This can be done by copying/moving hashdeep.exe(included in md5deep-3.5.1.zip) to C:\WINDOWS\.

Install cygwin/rsync(windows only)

 * Run setup.exe (during the install most defaults will work)
 * click Next


 * click next


 * click next


 * click next


 * click next


 * click next (choose nearby mirror)


 * click ok


 * search for rsync


 * toggle from 'default' to 'install' by clicking default


 * click next


 * install of cygwin and rsync will take a few minutes


 * click finish

Backing Up a Windows System
This example uses C:\Documents and Settings\ as a sample directory to be backed up

Plugin the external USB drive

 * take note of the drive letter the drive is mounted as (likely E:\)

Run your bash shell

 * run cygwin bash shell (use your newly created desktop icon)


 * YAY! now we have a usable windows/bash shell

From the bash shell
$ mkdir /cygdrive/e/$HOSTNAME-`date +%F`
 * make a directory for backup on your external hard drive

$ hashdeep.exe -c md5 -r /Documents\ and\ Settings/ > /cygdrive/e/backuphostname-date/hash.md5
 * run hash deep on the files that will be backed up (this may take a while)

$ rsync.exe -rvci --log-file=/cygdrive/e/backuphostname-date/rsync.log /cygdrive/c/Documents\ and\ Settings /cygdrive/e/backuphostname-date/.
 * run rsync to backup files to your external hard drive (this may take a while)


 * once backup is complete eject drive from windows machine

Backing Up a OSX System
this example uses the /users/ as a sample directory to be backed up

Plugin the external USB drive

 * Drive will appear on desktop. Take note of drive name, it is available under /Volumes/DriveName

Run Terminal
Terminal is available in the OSX Finder under Applications > Utilities > Terminal

From the Shell
$ hashdeep -c md5 -r /users/ > /Volumes/DriveName/backuphostname-date/hash.md5 $ rsync -rvci --log-file=/Volumes/DriveName/backuphostname-date/rsync.log /users/ /Volumes/DriveName/backuphostname-date/.
 * run hash deep on the files that will be backed up (this may take a while)
 * run rsync to backup files to your external hard drive (this may take a while)

Auditing Backup from Ubuntu/Archivematica
$ cd /media/yourusbdisk/backuphostname-date $ hashdeep -arvv -k hash.md5 Documents\ and\ Settings/
 * Insert USB disk
 * open terminal
 * in terminal change to backup directory on external drive
 * run hashdeep in audit mode

The audit will most likely fail, some programs running in windows have files on disk that change size often. You can compare the files that do not pass the audit by $ hashdeep -arvv -k hash.md5 Documents\ and\ Settings/ |grep No\ match $ hashdeep -arvv -k hash.md5 Documents\ and\ Settings/ |grep not\ used
 * using the following commands: