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.
9 5915
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
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)>
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.
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.
Will; try to do in next 24 hours
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\Backups\3
ren \\Server\F\Backups\2 3
ren \\Server\F\Backups\1 2
md \\server\F\Backups\1
xcopy D:\Data \\Server\F\Backups\1 /S /E /C /F /K /Y
ATTRIB -H -R -S \\Server\F\Backups\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
Thx Guys,
I'm doing R&D on Batch files. Very soon I'll get back to u.
NeoPa 32,557
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.
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...
Sign in to post your reply or Sign up for a free account.
Similar topics |
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...
|
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...
|
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...
|
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...
|
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...
| |
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
|
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...
|
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...
|
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...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
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...
| |
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...
|
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...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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 ...
| |
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...
| |