Analytica Business Systems: Pervasive.SQL and Btrieve Specialists

Pervasive.SQL, Btrieve and More KnowledgeBase | Article #16 | Delta Files Still Present After Backup Agent Ends
View an Article   Back
Title: Delta Files Still Present After Backup Agent Ends 
Category: Pervasive Backup Agent 
Keywords: backup agent, delta roll-in, still present 
Description: In a batch file like this:

1 C:\PVSW\PBA\bin\pvbackup.exe -on
2 xcopy f:\stuff\*.dat g:\backup\stuff\ /E /V /Y /R
3 C:\PVSW\PBA\bin\pvbackup.exe -off
4 xcopy f:\stuff\*.* g:\backup\stuff\ /E /V /Y /R

sometimes the xcopy in line 4 still finds *.^^^ files.

It looks like the command "pvbackup.exe -off" returns too early.

Solution:

The Backup Agent is simply using the "Continuous Operations Mode" of the database. When the ENDBU is received by the engine, the engine confirms that all files will start the roll-in process (wherein all
changes are rolled out of the delta files into the live files again).

The problem is that this process is also running in tandem with a live system. While the changes are being rolled back to the live files, new changes may be recorded at the Delta file -- making the process take
longer. In fact, this roll-in process can easily take in excess of minutes, hours in some very busy systems, and possibly even never.

Because of this, the PVBACKUP -OFF cannot be tied to the completion of the roll-in process, and the only way to ensure that the roll-in is complete is to wait until all deltas disappear.

There are two solutions:

1) Exclude the Delta files from your last XCOPY. This is MUCH easier.

2) Add code in the batch file to loop on the delta files. Something
like:
:Loop
SLEEP 10
IF EXIST *.^^^^^^ GOTO Loop

Use XXCOPY or ROBOCOPY, two XCOPY replacements that are much more powerful, and that only copy files that have been changed. onsole, not from a remote session.  
Approved

If you like our free Pervasive Knowledge Base Service, please consider purchasing your next Pervasive Software Product from our online store or call or email us!

In the meantime, to help us keep this service free, would you mind clicking on one of the ads at the left? Thanks for visiting!