Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Cold Backup of Visual FoxPro 7

Posted on 2009-03-31
3
Medium Priority
?
462 Views
Last Modified: 2012-05-06
I am quite unfamiliar with FoxPro and I am just looking to create a simple nightly cold backup. I can do this with SQL Server and Oracle but shutting down the database, then copying the datafiles. I am not sure how to do this in FoxPro.

Every backup article I find online is related to a hot backup. While a hot backup would be ideal, it seems there are no clean cut solutions without a 3rd party utility. A cold backup would be fine as it's not a database that needs to be online constantly.

0
Comment
Question by:atsci
3 Comments
 
LVL 43

Accepted Solution

by:
pcelba earned 500 total points
ID: 24033903
Cold backup of FoxPro database is very easy. FoxPro data are stored as files in standard file folders (extensions are .DBF, .CDX, .FPT, and many more). So if you know where these files are placed simply copy or zip them to your backup location. If you are not sure which folders contain application data simply copy all application folders including the programs. You have to ensure the data are not accessed during the backup otherwise the copy procedure could fail or backup incomplete data.

FoxPro has no native support for hot backup but it is possible to do it by program written in FoxPro language but the result is not 100% sure.
0
 
LVL 30

Assisted Solution

by:Olaf Doschke
Olaf Doschke earned 500 total points
ID: 24043522
Like pcelba says, it's as easy as it could be, you simply backup the files. you can even do that from inside your app, if you use the COPY FILE command, that also accepts wildcard characters like * and ?.

Copy File (lcDataDir+"*.*") TO (lcBackupDir+"*.*")

would be a start, when variables lcDataDir and lcBackupDir are set to the directories and as long as all database access is done (the database is 'cold'). This also works if files are open shared, but it will then of course not see anything in open transactions or in buffers.

Bye, Olaf.
0
 
LVL 6

Expert Comment

by:BALMUKUND KESHAV
ID: 24128216
Create a Dos batch file mention the following dos command in batch file
copy <your data directory\*.*> your backup directory name

Call the batch file either using any app. or win' scheduler. Be sure during the period your fox app./dbf should not be used by any user other wise it will give error.

Regards,
Bm Keshav
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Visual FoxPro (short VFP) is a programming language with it’s own IDE and database, ranking somewhat between Access and VB.NET + SQL Server (Express). Product Description: http://msdn.microsoft.com/en-us/vfoxpro/default.aspx (http://msd…
Your business may be under attack from a silent enemy that is hard to detect. It works stealthily in the shadows to access and exploit your critical business information, sensitive confidential data and intellectual property, for commercial gain. T…
Integration Management Part 2
Screencast - Getting to Know the Pipeline
Suggested Courses

972 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question