Backing it up

  • Thread starter Thread starter Newbee
  • Start date Start date
N

Newbee

I etup a databas on a shared drive at work. Is it possible to have it
automatically back itself up every day at a certain time (without splitting
it)? Thank you in advance.

Newbee
 
I think the right way is to define some task in windows that create a
directory and copy the DB to that directory.
if you cant find a solution, then mybe you can use that code under a button,
and ask the user to back up once a day.

' Make a directory to save the file to, better has date and time
dim MyDateStr as string
MyDateStr = format(now,"yyyymmddhhmm")
MkDir "c:\BackUp\" & MyDateStr
' copy the mdb to that directory
shell ("xcopy c:\MyDB.mdb c:\backup\" & MyDateStr )
 
I etup a databas on a shared drive at work. Is it possible to have it
automatically back itself up every day at a certain time (without splitting
it)? Thank you in advance.

Newbee

Note that for a database to be shared among multiple users, you would
be VERY unwise to leave it unsplit. Doing so is allowed but an unsplit
shared database is *very* prone to bloat and corruption.

Backing up a database should be done ONLY when the database is closed,
and nobody is using it at all. A backup of an open database -
especially if any user is in the process of updating anything - is
likely to be copied in an inconsistant state, and may lose data or
become corrupted in the process.

If you can assure that no users are in the database at 3am, say, then
you can use the Windows Scheduler to automatically make a copy of the
..mdb file (or files, though in a split database you don't normally
need to back up each user's front end, just so you have a master copy
saved).

John W. Vinson[MVP]
 
Hello Newbee I looked in some of my archived ms access 2000 save files, and
have a mdb that is a sample for backing up your db upon compacting. I
remember using it some time ago, and didn't have any problems.
It is a 132kb sized file, and if you want to post your email address I can
send it directly to you.
(If you post your email address, I would recommend that you post it with a
error ... and explain how to fix it so it works
e.g. [[email protected] (to email me change comet to com) that way your
email addy won't get harvested.

Let me know,
_Bigred
 
Back
Top