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 5924
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\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
Thx Guys,
I'm doing R&D on Batch files. Very soon I'll get back to u.
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.
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 WEEKLY: The post should be transmitted
with this frequency.
|
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.
|
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...
|
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,...
|
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...
| |
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
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...
|
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...
|
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
|
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...
|
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...
| |
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...
|
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...
|
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...
|
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...
|
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
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |