Should I backup DBF file while it is open?

Asked By 30 points N/A Posted on -
qa-featured

I need to create a small program that creates a backup copy of DBF files at a certain demand. The files will be used by a custom web application. Is it safe to copy a DBF file while it is open, or do I close the web server, so the files are released from certain creating a backup ?

SHARE
Answered By 590495 points N/A #188656

Should I backup DBF file while it is open?

qa-featured

Actually, you shouldn’t be accessing the database file while it is open maybe to create a backup copy. You might end up corrupting the DBF file even if you managed to successfully copy it. If you are using FoxPro and you want to copy its DBF files, it depends on how you want the data whether you want the exact copy or you just need a copy to play with.

If you need to have the actual copy of the DBF file, certainly you need to stop the FoxPro application. This is the only way you can be assured that all tables have been written to and closed and there is no work around on this. On the other hand, if you just need a copy maybe for testing or to mess around with, you can use xcopy in the command prompt applying the /z switch.

Related Questions