Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here




I've developed a small database that I would now like to deliver to a number of PCs to be used by people who are not too knowledgeable of PCs.  I would like them to backup the data regularly to a Zip/CDW drive and to be able to create multiple backups on the same media e.g by allowing the creation of new directories or file names within the backup utility

Can anyone suggest the best way forward?  

Also the application is still being developed and so the database/table structure is likely to change in the future.  Any suggestions on how this can be managed from a client friendly point of view?  

Many Thanks Andy.

RE: Backups

   I would suggest a couple of things... first, if they are "Non-PC" users, you will have some challenge in getting them to backup data to a "Location" that they have to specifiy.  Unless you can guarantee that the ZIP drive is always a particular drive letter, they will at a minimum have to "Pick" a destination.  In that case, I would recommend using the ADIR() function, and placing the results into a list box/grid type format that allows them to see the drives/drictories contents, and select one.
    After that, it is a relatively easy process to get them to press a "Backup" button.  What I would do in that case, is simply select every table, one-by-one, and "Copy" it to the "Selected" location.  You could do something like the following:

* The code below would go into your list box to set the "Location" of where they want the file to go.  This would include full "Path" including Drive & Directory, which you'd have to pluck out of the listbox you build.  Sorry for the theory, but I can't really illustrate it here, since I don't have objects to work with.  If you cant' get this to work, let me know, and I'll provide more details).

lcLocation = LOCARRAY(lnArrayPick)
* Then, get each table
USE TABLE1  && name of a table
lcTableCopy = lcLocation + '\'+ALIAS()+".DBF"
USE TABLE2 && Next table
lcTableCopy = lcLocation + '\'+ALIAS()+".DBF"
Etc, until you have all tables.  This requires some lengthy statments, but only needs "Maintainting" if you add additional tables.  You can add all the fields you like, because it will take all fields, and their indexes.  It may not be "Pretty", but it is effective.  If you want to get "REALLY" fancy, you could add some additional code to read the directory for all databases, and then set up a DO WHILE...  type loop, but really, there is no real need to be so fancy, unless you are going to frequently change/add tables.

This method will automatically overwrite any files in the destination, as long as SET SAFTEY is OFF.


Please let me know if this has helped!

RE: Backups


Thanks for that - I've tried it out in the command window and I'm confident I can get it to work that way.  As a restore facility would you suggest using the COPY FILE command (with the database close)?  Is this the safest way?  It feels safer that emptying a table and then doing an APPEND FROM command.

Thanks Again,


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close