General information
Category:
Coding, syntax & commands
Hi Charles,
Since you brought up the subject of the difficulty of copying open files, here is my strategy:
Of course it would be better if no other user were using the file when we try to copy. However, it is not always possible to get the file in EXCLUSIVE mode. Therefore, the best compromise, IMO, is to run the backup at night when few users are likely to be on the system. Then use a DOS command to COPY the file (or something similar to a DOS command, such as the API call Walter suggested or FSO as Alex suggested) to copy the file to another location and back it up from there. There is a chance that the the copy will not be good because someone is using the dbf and some data are cached. My architecture has the ability to know if it has the database in exclusive mode. If it does not have the database in exclusive mode, we must assume that the backup may not have integrity.
So it's not a perfect system, but it's pretty good, and we can know when a backup was made that may not be good (because some user may have been caching data when the backup was made.)
I don't favor VFP COPY TO or APPEND FROM style backup bacause it's too slow and it does not prevent the possibility of loss of data integrity.
Regards, Chaim
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only