473,569 Members | 2,458 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to create Periodic backup in Ms Access

6 New Member
Hi,

I need to build a functionality which can take backup of my database periodically, i.e. admin must able to set the timer in how many days he wants to run database backup. For example, If admin set 2 days then, in every 2 days it must create database backup whenever the Ms Access is open. Kindly, suggest.

Thanks in advance.
Oct 19 '08 #1
9 5924
GazMathias
228 Recognized Expert New Member
Why not create a simple batch file to copy the .mdb and set a scheduled task in Windows to run the batch file every x days?

Google dos batchfile
Oct 19 '08 #2
missinglinq
3,532 Recognized Expert Specialist
Gaz' approach is the way to go, keeping in mind that the database ***has to be closed*** at the time the copying is done! Trying to copy an open Access database is an invitation for data corruption.

Welcome to Bytes!

Linq ;0)>
Oct 19 '08 #3
youmike
69 New Member
If you are running a split database, i.e. front end with everything except the data and only data in the back end, my experience is that running a batch file to copy is not a problem.

I have one customer where we run several scheduled tasks at differing intervals - hourly, daily and weekly in this particular case - we had to use a backup the other day to deal with a power interruption issue and there were no difficulties.

As I said in another post, back-up set should include several folders (I simply number mine, 1 being the newest and thereafter 2, 3, 4 - as many as necessary) and the batch file should delete the oldest of the set, rename the others and create a new folder called 1, into which any files to be backed up are copied.

All of this assumes that you have knowledge of the DOS commands which have to be incorporated into a batch file. The switches associated with the DOS commands are important and can be accessed from the DOS command prompt. A disadvantage of this approach is that there is no file compression. This could be got round by having the scheduled task run a parameter driven compression program.

If anyone feels a need, I could post a sample batch file with comments.
Oct 20 '08 #4
javedsai
6 New Member
If you are running a split database, i.e. front end with everything except the data and only data in the back end, my experience is that running a batch file to copy is not a problem.

I have one customer where we run several scheduled tasks at differing intervals - hourly, daily and weekly in this particular case - we had to use a backup the other day to deal with a power interruption issue and there were no difficulties.

As I said in another post, back-up set should include several folders (I simply number mine, 1 being the newest and thereafter 2, 3, 4 - as many as necessary) and the batch file should delete the oldest of the set, rename the others and create a new folder called 1, into which any files to be backed up are copied.

All of this assumes that you have knowledge of the DOS commands which have to be incorporated into a batch file. The switches associated with the DOS commands are important and can be accessed from the DOS command prompt. A disadvantage of this approach is that there is no file compression. This could be got round by having the scheduled task run a parameter driven compression program.

If anyone feels a need, I could post a sample batch file with comments.

Please post it. It will help me.
Oct 20 '08 #5
youmike
69 New Member
Will; try to do in next 24 hours
Oct 20 '08 #6
youmike
69 New Member
This batch file assumes that there are three generations of backup files,
numbered 1, 2, 3 in a folder called “Backups” on the “F” drive of a network machine called “Server”.
These folders must be created before running the batch file.
It also assumes that all data to be backed up is in a folder called “Data” on the “D” drive of a local machine
In any batch file, any line that starts with a colon(:) is treated as comment.
Such lines are not processed

: START OF DOS INSTRUCTIONS
rd /S /Q \\Server\F\Back ups\3
ren \\Server\F\Back ups\2 3
ren \\Server\F\Back ups\1 2
md \\server\F\Back ups\1
xcopy D:\Data \\Server\F\Back ups\1 /S /E /C /F /K /Y
ATTRIB -H -R -S \\Server\F\Back ups\1
: END OF DOS INSTRUCTIONS
Notes regarding customising
All changes must be exactly right Typing errors are the biggest cause of problems when writing batch files.
File and folder names should be changed to suit your local requirements
Oct 20 '08 #7
javedsai
6 New Member
Thx Guys,

I'm doing R&D on Batch files. Very soon I'll get back to u.
Oct 23 '08 #8
NeoPa
32,564 Recognized Expert Moderator MVP
Strangely enough, I was just over in Windows talking about Batch files (or, as I recommend, CMD files).
I would (nearly) always recommend using CMD files rather than BAT files nowadays (since the early to mid noughties actually) though. Since the demise of Windows 98 (ignoring ME) all Windows based operating systems have been versions of Win NT, and so run the CMD.Exe command interpreter as well as the much more limited Command.Com version (compatible with all older versions of Windows as well as DOS).
In almost all situations BAT files run seamlessly in the CMD.Exe command interpreter.
Oct 27 '08 #9
javedsai
6 New Member
I tested batch files its working fine. But, my client told me that he want something which can be incorported by Ms acces i.e. I don't want any extra files. I want everthing with Ms Access itself.

I want to develop an application which should be user friendly. i.e Once I delivered my application then I don't want to give any kind of support to user/client. Thats why I required functionality through which user can set time and on that particular time system must take back up of my application.

For this purpose I'll be having interface where user can set time then, at that particular time system must take back up of application. Is there any other method then, plz suggest but, I don't want any extra or external file.


Note:- I don't want any extra file.

Thank you...
Nov 1 '08 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1833
by: Hans Forbrich | last post by:
Section 1. Ballot: ------------------- 1.YES NO: I agree that there should be a periodic post describing the newsgroup charter and providing a FAQ on newsgroup usage. 2.MONTHLY BI-WEEKLY WEEKLY: The post should be transmitted with this frequency.
0
1808
by: Hans Forbrich | last post by:
Section 1. Ballot: ------------------- 1.YES NO: I agree that there should be a periodic post describing the newsgroup charter and providing a FAQ on newsgroup usage. 2.MONTHLY BI-WEEKLY WEEKLY: The post should be transmitted with this frequency.
5
16854
by: TThai | last post by:
Hi, Appreciated anyone who can help us with our problem. Our backup job for ROUTT database has been failing for the last 4 days. It was working fine for almost a year now. The only thing happened few days before the problem started is the addition of more memory to the server because we've been getting the low virtual memory error. There...
1
2364
by: gcetti | last post by:
Can anyone recommend backup procedures for a SQL Server/MSDE product? We have upgraded our program from Access to SQL & before we could just tell our customers what .mdb files to include on their backup script. Now with SQL, the BACKUP/RESTORE SQL commands work as backups, but would involve a separate process for our customers to execute,...
9
4488
by: fishbaugher | last post by:
I have encountered some interesting crashes lately (Access97). Here is the symptom (after several days of different kinds of rebuilds including import and LoadFromText, all resulting in databases with the same symptoms). 1) Working database, Compile/Save All works, Create MDE works 2) Touch the references (mark a new reference, OK, then...
9
33504
by: khan | last post by:
can any one help me how to create an automatic backup of ms access database. Actually I want it to be done either by just clicking on a button or automatally make a backup at 6pm every day. plz help
5
8877
by: nishantxl | last post by:
Hi there, I am looking to design a project using C++ The main objective of the project is to display details of periodic table elements such as periodic element name, properties(such as atomic number and atomic mass) for each periodic number entered by user. I am thinking to input all the data regarding each periodic element number in form...
2
5776
by: Auddog | last post by:
Hello all, I'm fairly new to access database(s), but I work a lot with mysql. I was wondering if there is a script file out there that I can get a hold of that will create a dump file. I need to be able to backup this data nightly and would like it if the script file could name the file with that days date (so each dump file would be...
1
1963
by: learning_codes | last post by:
Hi , I'm wondering if there is a way for me to export some tables including data and structure from old database to a new database and then save as new database name. I try to create a marco and it create a new table within the same database. I would be appreciated if you can help me to create a code for one
0
7618
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8138
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7679
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7983
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5514
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5223
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
2117
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1228
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
946
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.