[AccessD] corrupt database - backup rather out-dated.

Brad Marks bradm at blackforestltd.com
Wed Jun 4 08:48:21 CDT 2014


All,

I would like to share how I do backups. 

I have one key Access 2007 application called DBAM_Portal that I work on a lot.  On some days, I may make 10 or more changes to this application.  

I know that it is possible to make backups from within Access 2007 using the (Manage / Back Up Database) option.  When I back up the DBAM.Portal application with the built-in Backup option, the file name is something like DBAM_Portal_2014-06-04.accdb, DBAM_Portal_2014-06-04_(1).accdb, or DBAM_Portal_2014-06-04_(2).accdb depending on how many times I create a backup on any given day. 

This works Okay, but I also started keeping a log of what was changed in the application and how this change was tied to a given iteration of the backup files.

I decided to put together a small script to make it easier to do backups.  This script is written using an open source tool called AutoHotKey, but it could be built with several different tools.

The script that I have uses an Input Box to collect my note about what was just changed in the application before the backup is created.

The script also puts a date/time stamp in the file name.

Let’s say that I run the script and when the Inputbox is shown, I key in “Added Report800”.

The resulting name of the backup file would then look something like this.
C:\Backups of DBAM Portal\DBAM_Portal_Backup_Added Report800_Tue_Jun_03_2014_02_16_39_PM.accdb"     

I have used this approach for a couple years and it seems to work nicely.  I no longer need to keep a log of what each backup was for as this info is now contained right in the file name of the backup file.

Brad


Here is the AutoHotKey code.  
_ _ _ _ 

MySource = C:\DBAM Portal\DBAM_Portal.ACCDB

Inputbox , Variable1  

FormatTime , VarTimeString , ,  ddd_MMM_dd_yyyy_hh_mm_ss_tt

MyTarget = C:\Backups of DBAM Portal\DBAM_Portal_Backup_%Variable1%-%VarTimeString%.accdb

Filecopy , %MySource% ,  %MyTarget% , 1

_ _ _ _



-----Original Message-----
From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Bill Benson
Sent: Tuesday, June 03, 2014 6:40 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] corrupt database - backup rather out-dated.

Backing up is nowhere near as important at working incrementally, methodically, not haphazardly - and architecting (as my friend David on the Excel lists calls the process). But my brain is not working well and my body is falling apart since cervical disk disease began affecting my arm.

So much so that this darned application has been interrupted eleventy-eleven times, and I never seem to know where I am/was/am trying to get to because I attack it and quit it at such irregular intervals.

The amount of design work and code I lost due to corruption is only 4 hours or so...

Not knowing what I was doing as of the last backup or where I really will be as of the next, is far more discouraging.

Backups without good documentation as to what point in the development cycle that backup was taken is not much use. I need more progress notes, not more backups.
On Jun 3, 2014 7:26 PM, "Darryl Collins" <darryl at whittleconsulting.com.au>
wrote:

> Yeah, Not saying this for you Bill, I know you have been around long 
> enough to know this stuff and just got unlucky (as well all have at 
> some point).
>
> When I do MS Access Dev work I usually just save a zipped copy a few 
> times a day.  This has saved my bacon numerous times.  MS Access does 
> tend to crap out randomly from time to time.  Usually you can recover 
> it by just importing everything into a new empty shell, but in some 
> cases, includings Bill's, it is toasted and you need to start from 
> scratch / backup / memory or whatever.
>
> Cheers
> darryl
>
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com [mailto:
> accessd-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence
> Sent: Wednesday, 4 June 2014 12:37 AM
> To: Access Developers discussion and problem solving
> Subject: Re: [AccessD] corrupt database - backup rather out-dated.
>
> Hi Bill:
>
> Hate to say it, but every programmer has to go through this 
> right-of-passage. These are mistakes you make once in your career but 
> with a bit of luck and effort you should recover in fine form. Now you 
> will remember the three main tasks you do as a developer; backup, 
> backup and backup.
>
> Jim
>
> ----- Original Message -----
> From: "Bill Benson" <bensonforums at gmail.com>
> To: "Access Developers discussion and problem solving" < 
> accessd at databaseadvisors.com>
> Sent: Monday, June 2, 2014 11:27:03 PM
> Subject: Re: [AccessD] corrupt database - backup rather out-dated.
>
> I believe the corruption occurred when my battery fully drained while 
> in sleep mode, or else when Windows Update forced a reboot at it's 
> regular 3AM destroy all user's work stealth settings brought to you by micro-scoff.
>
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav 
> Brock
> Sent: Tuesday, June 03, 2014 2:24 AM
> To: Access Developers discussion and problem solving
> Subject: Re: [AccessD] corrupt database - backup rather out-dated.
>
> Hi Gary
>
> That was doable for some cases where the header had been overwritten 
> by some malfunctioning cache or network error. Such a file was not 
> reparable by the repair routine.
> The simple trick was to find the latest backup or create a new 
> database, copy the header pages from this, and paste it over the 
> header of the corrupt database file.
>
> I haven't seen this kind of error for years. Networks have improved.
>
> /gustav
>
> -----Oprindelig meddelelse-----
> Fra: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] På vegne af Gary Kjos
> Sendt: 2. juni 2014 22:58
> Til: Access Developers discussion and problem solving
> Emne: Re: [AccessD] corrupt database - backup rather out-dated.
>
> Years ago we had a discussion here about using a hex editor on an 
> Access MDB file and copying parts of a working MDB file into a 
> corrupted one in order to make it good enough to be able to be opened 
> and for code or something to be extracted. It was a LONG time ago 
> though and I don't recall if it was actually successful or just a theoretical discussion.
>
> GK
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list