Making it easy for my users to backup

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi Guys

I am nearly ready to deploy a new application and want to add a menu item to
my SwitchBoard that will enable the user to simply "click" it and it will
take a complete copy of the database. I have split the application into FE
(Front end) and BE (Back end). Ideally, each time they click the "Backup"
button, it should create a unique backup file. For example, if the BE DB is
called "test_be" then the backup file should be valled "test_be_00001". If
they click it again, the the name should be "test_be_00002" etc.

Any ideas?

Thanks
Regards
Greg
 
Lateral said:
Hi Guys

I am nearly ready to deploy a new application and want to add a menu item to
my SwitchBoard that will enable the user to simply "click" it and it will
take a complete copy of the database. I have split the application into FE
(Front end) and BE (Back end). Ideally, each time they click the "Backup"
button, it should create a unique backup file. For example, if the BE DB is
called "test_be" then the backup file should be valled "test_be_00001". If
they click it again, the the name should be "test_be_00002" etc.

Any ideas?

Thanks
Regards
Greg

VBA code to do this is not terribly difficult, but I would ask what
would you do with so many backups of the BE? If the idea is to keep a
"good" copy on demand from each user, how will you determine which
user's backup is the one to restore in the event of such a need?
 
Hi,

The idea is to make it as simple as possible and a "no brainer". I might
even have it so that it takes a backup each time the application is started.
Do you have the VBA code to do this?

Regards
Greg
 
Hi Greg,

Check out the following article contributed by Access MVP Jeff Conrad:
http://www.access.qbuilt.com/html/custom_login.html

Scroll approximately 2/3 of the way down. You should see a section titled "A
Custom Login Form Can Provide Multiple Solutions". Paragraph 2 includes the
following:

<Begin Quote>
"I needed an easy way to back up the back end (BE) data tables. A simple
button on the form copies the whole BE file to a specific folder and date
stamps it. Please note that this particular setup was for a single
workstation application and would not be applicable for a multi-user
scenario. Since my custom login form is in an unsecured database file with no
links to the BE data tables, I do not have to worry about copying the file
while it is in use. Even if by chance the tables are being accessed, my error
handling stops the process and flashes up a nice message box for the user.
This is a very easy process for the users to make a backup."
</End Quote>

Although Jeff's sample does not include the Backup command button shown in
the screen shot, you can very easily add a button with a click event
procedure that calls the CompactDatabase method:

Copies and compacts a closed database, and gives you the option of changing
its version, collating order, and encryption. (Microsoft Jet workspaces only).

Syntax
DBEngine.CompactDatabase olddb, newdb, locale, options, password

You can look up this method in Access VBA Help for additional details.


Tom Wickerath
Microsoft Access MVP

http://www.access.qbuilt.com/html/expert_contributors.html
http://www.access.qbuilt.com/html/search.html
__________________________________________
 
Thanks Tom

Regards
Greg

Tom Wickerath said:
Hi Greg,

Check out the following article contributed by Access MVP Jeff Conrad:
http://www.access.qbuilt.com/html/custom_login.html

Scroll approximately 2/3 of the way down. You should see a section titled "A
Custom Login Form Can Provide Multiple Solutions". Paragraph 2 includes the
following:

<Begin Quote>
"I needed an easy way to back up the back end (BE) data tables. A simple
button on the form copies the whole BE file to a specific folder and date
stamps it. Please note that this particular setup was for a single
workstation application and would not be applicable for a multi-user
scenario. Since my custom login form is in an unsecured database file with no
links to the BE data tables, I do not have to worry about copying the file
while it is in use. Even if by chance the tables are being accessed, my error
handling stops the process and flashes up a nice message box for the user.
This is a very easy process for the users to make a backup."
</End Quote>

Although Jeff's sample does not include the Backup command button shown in
the screen shot, you can very easily add a button with a click event
procedure that calls the CompactDatabase method:

Copies and compacts a closed database, and gives you the option of changing
its version, collating order, and encryption. (Microsoft Jet workspaces only).

Syntax
DBEngine.CompactDatabase olddb, newdb, locale, options, password

You can look up this method in Access VBA Help for additional details.


Tom Wickerath
Microsoft Access MVP

http://www.access.qbuilt.com/html/expert_contributors.html
http://www.access.qbuilt.com/html/search.html
__________________________________________
 
Lateral said:
Hi,

The idea is to make it as simple as possible and a "no brainer". I might
even have it so that it takes a backup each time the application is started.
Do you have the VBA code to do this?

Regards
Greg

I don't have it anymore as I left it behind at a previous employer, but
the gist of the solution was this:

+ define a file naming rubric (as you have done) and a single location
in which to store backups
+ when creating a new backup,
++ parse the destination directory for files matching the rubric,
keeping track of the sequence number in each case, in order to determine
the highest sequence number present (use the Dir() function to enumerate
file names)
++ save the new backup with the next number in sequence

HTH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top