Click an Ad

If you find this blog helpful, please support me by clicking an ad!

Monday, May 7, 2012

My Home Setup and How I'm Backing it Up

My Home Setup and How I'm Backing it Up


So, my main system is a beast I built about 5 years ago. Not only was it to be my main system, but I was also using it to run virtual machines of various Windows servers while working on my MCSE. The important part is that it has four 500GB hard drives and one 1TB hard drive. Why? because you get better performance running virtual machines off multiple spindles.

C Drive: takes up about 150GB and is my system drive.
D Drive:  This is where I keep my stuff.
E drive: It is the home base for backups, as well as the staging area for any downloads.
F drive: Stores a copy of my nightly backup.
G Drive: Contains a mirror of everything on D Drive, as well as a copy of each night's backup.
H Drive: It's 1 Terabyte. It contains a mirror of my screenplay device (see next paragraph).

I have two other computer systems around the house (a desktop and a laptop), and a set-top device called an Iomega Screenplay (which is basically a network-accessible 1TB hard drive that can play stuff on my TV). The Screenplay is constantly mapped as the Z drive on my main system. The house is wired for Gigabit Ethernet for faster transfers, with wireless-G for my wife's laptop. The hostnames:

Megatron - this is my main system
Rasputin - my kid's computer
Wife-PC - my wife's laptop

At 11pm, a nearly identical batch file kicks off on both Rasputin and Trogdor:

net use T: "\\megatron\f$\backup holding area"
T:
rd /s /q "T:\From Wife-PC"
rd /s /q T:\Quicken
mkdir "T:\From
Wife-PC"
mkdir T:\Quicken
robocopy C:\Q-Backup "T:\Quicken" /MIR /NP
xcopy C:\Users\
Wife\Desktop "T:\From Wife-PC" /C /Q /E /Y
c:
net use T: /delete


My wife and kid don't do much in the way of content creation or downloading, so this is usually over pretty fast.

At 2AM, the backup process starts on Megatron. You can read what it's doing in the "REM" blocks within the batch file here:

@echo on

date /t

time /t
REM -------------Delete old backup files----------
f:
rd /s /q f:\backup\documents
rd /s /q "f:\backup\From Rasputin"
rd /s /q "f:\backup\From Wife-PC"
rd /s /q f:\backup\Quicken
rd /s /q f:\backup\mirc
rd /s /q "f:\backup\misc text"
rd /s /q "f:\backup\My Music"
rd /s /q f:\backup\pictures
del f:\backup\*.txt
del e:\backup*.rar
c:
cd\
REM -----------------------------------------------

REM Removing the old backup stuff
time /t


REM -------------MAKE THE FOLDERS-----------------
mkdir f:\backup
mkdir "f:\backup\From Rasputin"
mkdir f:\backup\Quicken
mkdir "f:\backup\From Wife-PC"
mkdir f:\backup\documents
mkdir "f:\backup\Misc Text"
mkdir "f:\backup\My Music"
mkdir f:\backup\pictures
mkdir f:\backup\mirc
REM -----------------------------------------------

REM Making the new backup folders
time /t


REM -------------Backup Phone Pictures-----------------
robocopy "H:\DropBox\Dropbox\Camera Uploads" "D:\Pictures\__Incoming\Charly's Phone" /MIR /NP /LOG:E:\robocopy.log
REM ---------------------------------------------------

REM This section syncs pictures from my phone which have been automatically uploaded to Dropbox



REM -------------COPY THE FILES--------------------
xcopy "F:\Backup Holding Area\From Wife-PC" "F:\backup\From Wife-PC" /C /Q /E /Y
xcopy "F:\Backup Holding Area\Quicken" F:\backup\Quicken /C /Q /E /Y
copy "d:\mirc 6.2" f:\backup\mirc
copy E:\*.bat "D:\MyDocuments\Scripts\For Home Use"
xcopy "d:\mydocuments" f:\backup\documents /C /Q /E /Y
xcopy "d:\My Music" "f:\backup\My Music" /C /Q /E /Y
xcopy d:\pictures f:\backup\pictures /C /Q /E /Y
REM ------------------------------------------------

REM This section moves my files to their backup folders
time /t

REM -------------Tree Text Creation-----------------
tree /F /A c: > f:\backup\Megatron-C-tree.txt
tree /F /A d: > f:\backup\Megatron-D-tree.txt
tree /F /A e: > f:\backup\Megatron-E-tree.txt
tree /F /A f: > f:\backup\Megatron-F-tree.txt
tree /F /A g: > f:\backup\Megatron-G-tree.txt
tree /F /A h: > f:\backup\Megatron-H-tree.txt
REM ------------------------------------------------

REM This section makes "tree" files so I can recreate my file structures if need be
time /t


REM -------------Run Robocopy Jobs-------------------
del e:\robocopy.log
robocopy D:\CBTs G:\D-Mirror\CBTs /MIR /NP /LOG+:E:\robocopy.log
robocopy D:\Education G:\D-Mirror\Education /MIR /NP /LOG+:E:\robocopy.log
robocopy D:\Icons G:\D-Mirror\Icons /MIR /NP /LOG+:E:\robocopy.log
robocopy D:\ISO G:\D-Mirror\ISO /MIR /NP /LOG+:E:\robocopy.log
robocopy D:\Mp3 G:\D-Mirror\MP3 /MIR /NP /LOG+:E:\robocopy.log
robocopy D:\MyDocuments "G:\D-Mirror\My Documents" /MIR /NP /LOG+:E:\robocopy.log
robocopy D:\Pictures G:\D-Mirror\Pictures /MIR /NP /LOG+:E:\robocopy.log
robocopy D:\Software G:\D-Mirror\Software /MIR /NP /LOG+:E:\robocopy.log
robocopy D:\Technet G:\D-Mirror\Technet /MIR /NP /LOG+:E:\robocopy.log
robocopy "D:\The Library" "G:\D-Mirror\The Library" /MIR /NP /LOG+:E:\robocopy.log
robocopy D:\Wallpaper G:\D-Mirror\Wallpaper /MIR /NP /LOG+:E:\robocopy.log
robocopy D:\Mp3-Wife G:\D-Mirror\MP3-Wife /MIR /NP /LOG+:E:\robocopy.log
REM ------------------------------------------------

REM This section is making a mirror image of folders on D drive that I'm not including in my backup.
time /t


REM -------------Delete Shortcut files--------------
f:
cd\backup
del *.lnk /S
REM ------------------------------------------------

REM I'm removing all the .lnk (shortcuts) from the backup
time /t



REM -------------Compress/split Backup--------------
c:
cd\
cd\"program files (x86)"\winrar
rar a -m5 -o+ -r -t -v4300000k -r -preallylongpassword e:\backup.rar f:\backup
REM ------------------------------------------------

REM Using Winrar to compress my backup into files that will fit onto single-sided DVDs
time /t


REM -------------Delete Blat log file---------------
del e:\blat.log
REM ------------------------------------------------

REM Removing yesterdays log file
time /t



REM ------------Screenplay Picture sync-------------
e:
cd\
del screenplay-picturesnightly.log
robocopy "D:\Pictures" "\\IOMEGA-D714CA5C\ScreenPlay\Pictures" /MIR /NP /R:5 /W:5 /LOG:E:\screenplay-picturesnightly.log
REM ------------------------------------------------

REM Mirroring all of my pictures to the screenplay device
time /t

REM -------------Copy Cloud Files-----
copy D:\MyDocuments\Passwords\*.* H:\DropBox\DropBox\PWD /Y
robocopy D:\MyDocuments H:\DropBox\Dropbox\MyDocs /MIR /NP /LOG+:E:\robocopy.log
robocopy D:\MyDocuments "H:\GDrive\Google Drive\MyDocs" /MIR /NP /LOG+:E:\robocopy.log
robocopy D:\MyDocuments H:\SkyDrive\Documents /MIR /NP /LOG+:E:\robocopy.log

REM ------------------------------------------------
REM Copying "My Documents" to my Google Drive, Skydrive, and Dropbox folders


REM -------------Mirror backup RAR files to F and G Drives-----
e:\
cd\
copy e:\backup*.rar f:\
copy e:\backup*.rar g:\

REM ------------------------------------------------
REM Copying my backup files to 2 other drives, in case of drive failure

type e:\screenplay-picturesnightly.log
type e:\robocopy.log

REM These commands writes my log files to standard output
date /t
time /t


The date and time commands let me know how much time each step in the backup process is taking. It takes about 3 hours for the whole cycle to run through.

The backup file above is called by the command "E:\backup.bat > backuplog.txt" so that the entire output above is saved to backuplog.txt. After this task completes, another batch file runs which uses a program called blat to email the backup log file to me. If I ever get motivated I'll use Powershell for this, but the process works, so.....

I try to take a backup off-site once a month, so I'm not wasting a bunch of DVDs (I'm up to four now). Realistically, the only thing that will cause a loss of important data is total destruction of my computer. My Documents are synced to 3 different cloud services, and my pictures are mirrored upstairs to my screenplay.

I have found that this solution works best for me. I have a ridiculously low bandwidth cap; I have the lowest tier plan on Charter cable, which affords me only 100GB per month (upload and download). Also, I don't like to pay a monthly fee, so I don't want to use services like Mozy or Carbonite. I could get 2 external USB drives and just swap them out, keeping one of them offsite, but I have mouths to feed and so on, and I can find better things to do with $300. So, in the end, I chose redundancy as my hedge against hardware failure.

No comments:

Post a Comment