Engineering Leader · Private Pilot · Dad · PSU Hockey
OAT 72° XPDR 1200 GS 145 18:42Z
10
20
10
20
160150140130120110100
138
32003100300029002800
3,000
306090120150
90
My Life
Bio & background
PROFILE · SET
My Computers
Current rigs
UPTIME · 100%
My Projects
What I'm building
STATUS · ACTIVE
Résumé
Curriculum vitae
FORMAT · HTML

Later and later every day

06/05/04 @ 5:31 am · By Steve Hoffman · Comments (0) · Leave one
    Well, it's about 2:00am on a Friday night, and I am here sitting on the couch.  I actually just finished writing an extremely badass little app for work.  What I basically had to do was clean up wasted space.  Our Database at work is quite large, its around 13Gigs and naturally we like to keep it backed up in several places.  The only thing is, space is at a premium these days.  So our backup schedule is as follows:  Saturday at midnight we do a Full backup of the database : 13GB, then every other night at midnight we do a differential backup : ~500MB (looks at the full backups and only records the changes since it (or the night before), finally we do a log of all transactions in 15 minute increments, these only take up about 500KB.  So basically in the event of a disaster, we should only lose (at most) 14 minuts of information.  In my mind that is acceptable.  So my program looks in the three different directories and looks for the most recent backups...so lets say the 15 min backup directory has two day worth of backup files in it (that's one file for every 15 minutes...lots of files).  It will look at the nightly backup directory and see when the last nightly was preformed (hopefully the night before) and delete all log files older then that nightly.  Likewise with the full backups, if that happens every saturday, the program makes sure that the full acutally occured, then deletes all Diffs and Logs older then that backup.  It's a thing of beauty if you ask me!  Honestly, if I commented my code a little better, I would say I'm one hell of a programmer!  But alas, I don't; the comments are there only for me, and in ten years, I will not remember what the hell I was thinking...but such is life!

Comments

No comments yet — be the first.