Automatic Database Backup

Is it possible to right code to automatically backup a database? And if so 
how, or where, can I get information on this?
0
Utf
2/4/2008 3:05:02 PM
access 16762 articles. 2 followers. Follow

4 Replies
757 Views

Similar Articles

[PageSpeed] 49

Hi

There are a few way to do this.  I have windows scheuler doing this on all 
my databases (at 1 min past midnight each day).  Open Scheduled Tasks (it's 
in the control panel).  It's very simple and not likely to go wrong


-- 
Wayne
Manchester, England.



"Ayo" wrote:

> Is it possible to right code to automatically backup a database? And if so 
> how, or where, can I get information on this?
0
Utf
2/4/2008 3:56:01 PM
Thanks Wayne.
 So I take it that, there is no way to write that into a VBA code? I will 
try the scheduler in windows>

"Wayne-I-M" wrote:

> Hi
> 
> There are a few way to do this.  I have windows scheuler doing this on all 
> my databases (at 1 min past midnight each day).  Open Scheduled Tasks (it's 
> in the control panel).  It's very simple and not likely to go wrong
> 
> 
> -- 
> Wayne
> Manchester, England.
> 
> 
> 
> "Ayo" wrote:
> 
> > Is it possible to right code to automatically backup a database? And if so 
> > how, or where, can I get information on this?
0
Utf
2/4/2008 4:02:01 PM
The scheduler does show any options for backin-up a database.

"Wayne-I-M" wrote:

> Hi
> 
> There are a few way to do this.  I have windows scheuler doing this on all 
> my databases (at 1 min past midnight each day).  Open Scheduled Tasks (it's 
> in the control panel).  It's very simple and not likely to go wrong
> 
> 
> -- 
> Wayne
> Manchester, England.
> 
> 
> 
> "Ayo" wrote:
> 
> > Is it possible to right code to automatically backup a database? And if so 
> > how, or where, can I get information on this?
0
Utf
2/4/2008 5:09:01 PM
Yes of course you can it's simple but a REALLY BIG mistake.
You could use something like
Dim strOldPathName As String
Dim strNewPathName As String
myfile = Dir("C:\Path to DB here.mdb")
If myfile <> "" Then
Kill "C:\Path to BackUpName here.mdb"
strOldPathName = "C:\Path to DB here.mdb"
strNewPathName = "Some Drive:\BackupName.mdb"
strOldPathName, strNewPathName
Else
strOldPathName = "C:\Path to DB here.mdb"
strNewPathName = "Some Drice:\BackupName.mdb"
End If

BUT DON'T
You can't backup or compact a DB that someone may be working on or isn't 
open in exclusive mode (well you "can" but it's not reliable - and thats not 
the point of a backup).  Check out the MS knowledge base for a load of 
reasons to NOT do this.  

The best way is to either
Use a DB that is set up to backup all your other DB's and run the code from 
there
Use scheluder (the best and simplest way to do this)
Use this method on the MVP site
http://www.mvps.org/access/modules/mdl0045.htm


-- 
Wayne
Manchester, England.



"Ayo" wrote:

> The scheduler does show any options for backin-up a database.
> 
> "Wayne-I-M" wrote:
> 
> > Hi
> > 
> > There are a few way to do this.  I have windows scheuler doing this on all 
> > my databases (at 1 min past midnight each day).  Open Scheduled Tasks (it's 
> > in the control panel).  It's very simple and not likely to go wrong
> > 
> > 
> > -- 
> > Wayne
> > Manchester, England.
> > 
> > 
> > 
> > "Ayo" wrote:
> > 
> > > Is it possible to right code to automatically backup a database? And if so 
> > > how, or where, can I get information on this?
0
Utf
2/4/2008 6:21:01 PM
Reply:

Similar Artilces:

A program is trying to automatically send e-mail on your behalf.
I tried posting this in microsoft.public.outlook.general, but no nibbles. ------------------------------------------------------------------------------------------------------ Does anybody know how to turn the "A program is trying to automatically send e-mail on your behalf." prompte off? It pops when one of my MS Access apps is emailing one of it's reports to somebody. It happens on the Citrix server that one of my MS Apps is running on, but it does not happen when the app is running on my own PC. Consequently I'm hoping for some user-configurable setting that controls...

Repair SQL Corrupt database
Hi, I have a corrupt MS SQL Server 2005 database which I am trying to repair using: DBCC CHECKDB ('MYDB', REPAIR_ALLOW_DATA_LOSS) Unfortunately this does not seem to fix anything. After running the repair multiple times, I ran DBCC CHECKDB ('MYDB') WITH NO_INFOMSGS to see if it fixed the corruption, I noticed that is was returning a random amount of errors on each run. Does any know if It is the case that this database is beyond repair? If so will the best approach be to revert back to a non corrupt database backup and then roll forward using Transaction Lo...

Exchange Front End Backup Frequency
Server 2003 Enterprise Front End and Back End Exchange 2003 Standard 2003 AD native/native Front end has empty store mounted for SMTP forwarding. What frequncy would you recommend backing up the front end server since it holds no real changing data? Can I get away with once every week? (hopefully) Backend has sufficient backups every day in place. Thanks for your help, Harry On Sat, 20 May 2006 10:34:14 -0400, "Harry Bates" <harry@NOSPAMrocksystems.net> wrote: >Server 2003 Enterprise Front End and Back End >Exchange 2003 Standard >2003 AD native/native &...

Money 2006 constantly faults with automatic updates
Whenever I use the Internet automatic updates, money faults out and wants to send a report to Microsoft. Also my account list shows most accounts with a status of 'Update In Progress' I've done a complete reinstall after removing it and power cycling my machine. I thought it may have been something with removing 2004 and installing 2006, but got same problem Has anyone else been having this problem? I really just want to go back to Money 2004. What's the error message? -- Glyn Simpson, Microsoft MVP - Money http://money.mvps.org Check http://money.mvps.org/faq f...

Automatic CC
Hello, Is there any way to create a template where a contact is automatically CC in the email. So I dont forget to cc them every time I send an email. Thanks ...

Database Reference Formula Help
Let's try this again. I posted this earlier, but somehow my reply never appeared to the original even though a successful confirmation appeared.... So, we'll give it another try. I have a question and answer database that I am maintaining. Each question has an ID number. Additionally, each answer for the question has other relevant questions linked to that answer. What I want to do is to create a column in this database that will tell me for each question ID, what other questions it's linked to, so when it comes time to change a question or answer, I know whic...

Automatic axis format
Hi, I'm need to make a automatic axis format within excel. The number of rows is depending of a imported file. No problem to get the max. number of rows. But to put this number into the chart ( category axis) is more problematic. I try VB but my knowledge is at dummy level ! Waiting for your reply............. Hi, Have a look at Jon's examples of dynamic charts. http://peltiertech.com/Excel/Charts/Dynamics.html Cheers Andy jos wrote: > Hi, > I'm need to make a automatic axis format within excel. > The number of rows is depending of a imported file. > No problem to g...

I open the MDB, the form runs automatically
Simple question I have an MDB file with 20 files and 7 forms in it. When I open it up, the form runs immediately an access goes into some sort of protected mode. I can't view the tables, queries etc. I can see the code by pressing Alt F11 but not the data. I created a blank db and imported the mdb so I could see the tables. But how do I open the original without it running the code? When I look at the code. I don't see anything that sets properties or invokes the code automatically. There are no macros in this, just the forms and associated code with them. Any ideas Thanks Colm ...

Automatic updates, automatically disabling itself
Automatic updates, automatically disabling itself. 2nd day now onecare popped up to tell me the updates turned themselves = off. I'm thinking what malware would want to turn the updates off ? Any idea what's going on here ? Did I AUTOMATICALLY install an update = that caused this ? <keepout@yahoo.com.invalid> wrote in message news:8l7mi5tkgp1gd15fkef71ll5mrui9ukmht@4ax.com... > Automatic updates, automatically disabling itself. > > 2nd day now onecare popped up to tell me the updates turned themselves > off. Drop OneCare and install Microsoft Sec...

My worksheet automatically adds a fill color when I enter text.
When I type text in a blank cell, the cell automatically is highlightes with the bright yellow fill. There is no conditional formatting on this workbook. Check your VBA editor. You might have an Event Macro which does what, usually, a CF does. Try to Increase the Macro Security to its maximum level in order to eliminate the Event Macro from running... You may, also consider to "rem" all the Macro commands by adding a Preceding apostrophe to each command. Micky > When I type text in a blank cell, the cell automatically is highlightes with > the bright yello...

How do I get an automatic equal sign to begin the formula bar?
How do I get an automatic equal sign to appear in the formula bar in Excel for Microsoft 2003? This happened for me in the 2000 version and I could just click on it with my mouse pointer, but now all that appears is the function sign with no equal sign after it. It makes my job a lot more time consuming to have to type in the equal sign while building formulas. Please help, anybody? The = icon disappeared in newer versions of excel (xl2002???). You can add an = icon Tools|customize|commands tab|Insert category (Scroll down the list until you find the = icon) And drag it to your fav...

Backup OneNote files to CD
I lost a lot of my one note files when I purchased a new computer. I put them on CD but could not restore them from CD. I did not use the backup facility, as I am a new user of onenote and was unaware of this function. I now use back up regularly. My question is: is this the correct way to save files so I can put them on a CD and be able to restore them back in onenote should the need arise? I don't want to take a chance of losing any more files. -- John -------- Original-Nachricht -------- > I lost a lot of my one note files when I purchased a new computer. I put ...

Having numbers automatically appear bold
Hi all, Had such great advise last time, thought I'd try again. I have a large range of cells where I will be inputing sales figures i the form of currency revenue. The range is about G-I and 1-400. Th sales data will be a comparisson of YTD 2001 - 2004 revenue results. What I hope to do is have any figure that is above $30,000 appea automatically in bold so as to stand out as a good client. I gues there is something in the IF function to do this but I'm stumped. Any ideas? Thanks again in advance. Saxte -- Message posted from http://www.ExcelForum.com select the range you wa...

Is it possible to automatically move data entered in columns into rows?
Is it possible to automatically move data entered in columns into rows? It seems like a simple thing to do but I can't find a function anywhere. Cheers, Richard Thorneycroft Husky Products If you enter something in ONE cell it is automatically in a row and a column. So, perhaps a bit more explanation is in order. -- Don Guillett SalesAid Software donaldb@281.com "Richard Thorneycroft" <dancecommander81@hotmail.com> wrote in message news:9e2f3f75.0411160750.7003c6ab@posting.google.com... > Is it possible to automatically move data entered in columns into rows? >...

Automatic Forward
How can I automatically forward messages received from a specific sender to another's e-mail person? Thanks, ...

CE6: How to Disable SIP popup automatically
Hi, I know SIP popup can be disabled by the following registry setting in CE5: [HKEY_CURRENT_USER\ControlPanel\Sip] "TurnOffAutoDeploy"=dword:1 But It doesn't work in CE6. How to disable SIP auto-Popup in CE6? Thanks. Eric The SIP Auto Deploy in CE is due to Windows Controls invoke SHSipPreference (exported by AYGSHELL.DLL). So the easiest way is to avoid including AGYSHELL (SYSGEN_AYGSHELL) But if excluding AYGSHELL is not an option, you may need to modify the SHSipPreference (PRIVATE\SHELL\SHELLPSL\HAVEAYGSHELL\shellpsl.cpp) to supress SIP s...

Automatically format charts with range of dates
What I am trying to do is I have 4 charts that are linked with data from another spreadsheet. They are basically week totals for my business and make a chart compared to say last year. What I want to do though is have an option on my report that I can enter in a specific date or a range of dates and have the charts automatically filter the new data in and change. Instead of having to go into the chart data and changing what series of data I want to have a chart for I want to be able to just enter eg. "April 12-April 18" and have the charts bring up that data to reflect the ...

Automatic Database Backup
Is it possible to right code to automatically backup a database? And if so how, or where, can I get information on this? Hi There are a few way to do this. I have windows scheuler doing this on all my databases (at 1 min past midnight each day). Open Scheduled Tasks (it's in the control panel). It's very simple and not likely to go wrong -- Wayne Manchester, England. "Ayo" wrote: > Is it possible to right code to automatically backup a database? And if so > how, or where, can I get information on this? Thanks Wayne. So I take it that, there is no way t...

automatic output from known data
i have 2 spreadsheets of data: 1=english, 2=metric each spreadsheet has 3 columns, with the first column being an ID #. on my output spreadsheet i have 4 blanks. in blank 1 i enter a "1" or "2" for english/metric in blank 2 i enter the ID # i want blanks 3 and 4 to automatically be filled with the other tw numbers from the id#'s row. DATA WORKSHEETS english 1 123.8 9.8 2 122.7 10.3 ... metric 1 1983 9.8 2 1965 10.3 ... OUTPUT WORKSHEET blank 1 = english <----- manual blank 2 = 1 <----- manual blank 3 = 123.8 <---- automatic blank 4 = 9.8 <---- automati ...

Insert date automatically
I have a column with values such as: 3/25 3/24 3/29 3/21 3/21 3/21 And wish to automatically add todays date if the value of the cell is blank in the mm/dd format. I have used an =If(Column:Column="",TODAY()) in a column next to it and formatted it in mm/dd to get the desired result. But how can I take this value (todays date) and insert it back into the original column automatically and without changing the other valuse? As always thank you! Rick Hi, Rick: Here's one way. Step 1 is to make a backup of your original file so you have a fallback in case something goes ...

Taking database offline
Hello, I want to take the database offline to do a restore. It is taking forver.... Its sql 2005 enterprise sp2. I tried rebooting the server. Server is windows 2003 enterprise. tnt tnt Are there any activities on the server? Kick out all users/trans ALTER DATABASE db SET Single_USER WITH ROLLBACK IMMEDIATE; ALTER DATABASE db SET MULTI_USER WITH ROLLBACK IMMEDIATE; THEN ALTER DATABASE db SET OFFLINE "tnt" <tnt@discussions.microsoft.com> wrote in message news:D1B8F112-6850-43D8-A8A6-C11CFA14073C@microsoft.com... ...

How to automatic sort email into folder and download attachment
Hi, I have a surveillance camera which will send out email when it detect motion. I can receive hundreds of emails just from this camera in a single day, so it troublesome to read and click on each email just to download the attachment. When the outlook receive the email, I know how to sort it into a designated folder. But is there anyway it can automatically download the attachment (video file) into a folder without the email. (so that I can store the video file in a CD later on). Anyone can help me. Thank you. Nelson Chou I can receive hundreds of email just from...

Those old Access 97 databases AFTER the conversion to 2000
I have just converted a 97 database I created long ago to 2000. After many fixes to things that just do not work the same in 2000 as they did in 97, I figured I could move the access 97 version to a new folder to save for now. When I next tried to open the 2000 converted copy, nothing worked. It would not load the main form menu, but did seem to load the database. But, trying to open a few items. .. nothing worked. Once I returned the Access 97 database to where it had been, everything was fine. Am I stuck with the Access 97 databases after I convert? Is the 2000 copy referencing...

automatically
This is a multi-part message in MIME format. ------=_NextPart_000_0089_01C60228.AFA5BDA0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi.. i used outlook express and now I am using outlook, but the contact = option is different from Outllok express. in outlook express when I = write a first character of one contact, outlook express complete the = address automatuically, in outlook 2003 no!! can i change this?? Can = outlook 2003 complete autoomatically my addresses?? Pls, help me! thks, Jane ------=_NextPart_000_0089_01C60228.AFA5B...

excel vba
i am trying to set up something in cell K5 whereby it will produce upo opening, a sequential number 1 higher than the last. I think the end code is Range("K5").Value + 1 but how do i set it up to get that sequencing -- Message posted from http://www.ExcelForum.com Hi You need this event to run your code line when the workbook opens Private Sub Workbook_Open() With Sheets("sheet1") .Range("K5").Value = .Range("K5").Value + 1 End With End Sub Right click on the Excel icon next to file on the menu bar Choose view code The ThisWorkboo...