-1

Is it safe to make a copy (via cmd with copy or robocopy, or by copying and pasting it) for backup purposes of a file-based multiuser Visual FoxPro datbase while other users are accessing it?

leeand00
  • 25,510
  • 39
  • 140
  • 297

2 Answers2

1

I would say that it is not a safe operation. First of all, I am not sure if it is possible. I have not tried it but it might be that when you try to copy it the copy will fail telling you the file is in use. Even if it does allow you to copy it there is danger in it because when the database is open changes can be made to it. Visual FoxPro database is no different then any other file stored on the file system so if part of the file is copied and a change is made then the backup can be corrupt, and a corrupt database becomes unusable.

GeneS
  • 145
  • 7
1

Copying a DBF will fail if anyone has it open EXCLUSIVEly.

We do use robocopy here as a secondary backup, but we schedule it to run at (IIRC) 3am, when no live users are in the system and automated processes are likely to be finished. We don't entirely trust a copy made during working hours when users are writing to tables a lot - no way to know whether the resulting tables will be consistent.

Also, you'd have to worry about the .CDX and .FPT (if applicable) being out of sync with the .DBF, since they'd be copied at a different time.

So the answer to your question is "Probably not, unless you can be sure no writes are taking place (and of course the tables are not opened exclusively)."

LAK
  • 961
  • 7
  • 18