Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Regular Backups

Status
Not open for further replies.

briggsy79

Programmer
Feb 23, 2001
68
SE
Hi all!
Just after any tips anyone has on ways to backup an access database, every two days or so. What is the best way to do such a thing?
Thanks.


-David
 
What do you want to backup? Data only, or data and objects?

For data-only, where space is a concern, you could loop through msysObjects for tables of type 1 or 6 (local and attached--you don't want to backup odbc tables--let the backend do that) and create text files in a temporary dierectory with Docmd.TransferText blah,blah,blah
Then in the loop, shell to pkzip with the -a switch adding each text file, then Kill the text file. I'm not sure about winzip's ole or command line capabilities, this would be a better option since pkzip has the 8.3 filenames

This has advantages over doing a TransferDatabase and transfering the tables to a new mdb, since you don't want the indexes, and text files compact much better than .mdb.

For objects, it's similar, but do docmd.TransferDatabase, using logic in the loop for the MsysObjects.Type--changing the transferdatabase's ObjectType accordingly in the loop. Do this for only non-table objects, or, if space isn't much of a concern, do it for all non-odbc tables as well.
Just a couple options, I'm sure there are many others...
--Jim



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top