Hello again and welcome back to our course on Access 2016.
In this section we’re going to look at a very important topic and one which will slightly
interrupt our flow in terms of further developing our databases.
But once you start storing even a moderate amount of data in an Access database you need
to make sure that that data is safe.
Now various things can go wrong.
For instance let’s suppose that you’re working through this course on a laptop and
you’re setting up your movies and you’re starting to add movie information, maybe you’ve
started creating a database covering something of your own interest as well.
If somebody stole your laptop with all of your work on it you’d be more than a little
unhappy.
Unfortunately another possibility is that you’re working away on your Access database
or databases and for some reason one of them gets broken.
Something happens.
It could be Access’s fault not yours but the database stops working.
Now one very important thing to have up your sleeve in either of these situations is a
backup copy of your database.
Now I should point out that what I’m talking about in this section relates to Access desktop
databases and not Access apps or web apps, which we’re going to look at a bit later
on.
And I should also point out that one of the big advantages of Access is that in the configuration
that we have at the moment everything is in one file, one ACCDB file, so you don’t actually
have to do anything other than keep a safe copy of your ACCDB file.
Now I should also point out that the use of a single ACCDB file is only one way of creating
and operating Access desktop databases.
There are options such as splitting the database which mean that you can separate out the data
from what’s called the UI, the User Interface.
But here I am talking in this section just about the situation where we have a single
ACCDB file.
Now in order to take a backup it really is a straightforward case of copying that file
on a regular basis.
And when you do it will depend on how much you use the database.
So if you tend to use a database every day, do quite a bit of work on it you don’t want
to lose a load of data, maybe you’re entering new records every day.
You probably want to take a copy of the file every day.
If you only use it occasionally you may want to take a copy of it say just after you’ve
done a batch of work on it, on a more irregular basis.
Other situations in which you might want to take a backup copy might be just before you
make a major design change.
So let’s suppose you’re working on the movie database, you’ve added a load of movies
and you’re just about to add the actors to the movies and maybe make some more changes
to the movie table.
Immediately before that would be a good idea to take a backup of your database so that
if it all goes horribly wrong you can get back to that backup copy.
You’ll also see later on in the course when we talk about queries that you might do what
are called Action Queries, queries where you update some data using some sort of programming
logic.
Let’s think in terms of Esprit de Tour.
Maybe once a year they run a query which updates all their prices, say increases them by 3%.
Immediately before that would be a good idea to take a backup of the database so that if
the query goes wrong you can go back to how things were before you tried to run it.
So there are many reasons for running backups.
There are many occasions where you might need to run a backup either on a regular scheduled
basis or on an ad hoc basis to cover a particular situation.
Now there is a very good Help topic to explain a lot of this and to tell you how to backup
a database and indeed how to restore a database.
There’s the topic, Protect your data with backup and restore processes.
I suggest that you read through that topic.
Note one or two particular topics here, Plan regular backups, Backup a split database.
This is the situation I briefly mentioned just now where a database is split between
data and the user interface side of things.
This is what we normally refer to as the backend and the frontend.
There’s the topics on restoring a database or restoring individual objects in a database.
So that’s a very important topic and it’s very important that you get your backup regime
in place.
Now I’m not going to fully backup this Night Movies database but I am going to go through
part of the backup process as described in this Help topic.
If I wanted to run a backup now of my Night Movies database first it’s very important
to make sure that there is nothing in progress, I’m not halfway through updating a record
or something like that.
Now I’m going to make sure that the database is in effect not being used.
This of course becomes a more complicated thing to do when more than one person is using
the database.
But let’s suppose it’s just me.
I go File, Save As, and one of the options under Save Database As is Backup Database.
If I click on Backup Database and then Save As what Access 2016 will do will be to save
my database and it changes the name.
it puts the date as part of the name.
And in that way if you wanted to keep a succession of backups you could quite easily.
And of course that will always identify for you when a particular backup was run.
And basically what it does is to take a copy of the ACCDB file and its contents at that
time.
Now for the complete instructions for doing a backup, although to be honest that’s almost
all of it, I refer you to that Help topic and I do suggest you read through that Help
topic and treat the contents of it very seriously from this point onwards, particularly if you’re
creating your own databases already and starting to add valuable data and put valuable time
into designing and building tables and other objects.
So that’s backup in Access 2016.
I’ll see you in the next section.