Backup: Impossible to restore if using segmented log

4D, Inc. (7/22/08 4:13PM)
Basil Bourque (7/24/08 4:02PM)
4D, Inc. (7/24/08 4:10PM)


4D, Inc. (7/22/08 4:13 PM)

files?

Hi Basil,

The overall design is:

1. Restore the backup.

2. Integrate the oldest log file that corresponds to that backup.

3. Integrate the next newest log file.

4. Repeat step 3 until all log files are integrated, starting with the

oldest and proceeding to the newest.

Basil Bourque wrote:

---|  Problem  |----------------

Using 4D Server 2004.7r3 on Windows Server 2003, I created a simple
little scratch database (1 table, 1 field, no records) to:

- Backup a few times.

 (Choose the File > Backup menu item on 4D Server gui)

- Segment a few times. For example on backup 0003, create segments
such as [0003-0001] [0003-0002] and [0003-0003].

 (On 4D Client, run code that runs code on sever to call "New Log
File".)

- Backup again. in our example, 0004.

 (Choose the File > Backup menu item on 4D Server gui. Note that 4D
creates a mysterious .4BL file.)

- Create a record that says "After BK 0004".

- Quit 4D Server

- Restore from backup 0002.

 (Start 4D Server without a database, click the Restore button on
Welcome screen, click the browse button, locate 0003.4BK, re-direct to
a special folder, and restore.)

Why would you choose 0003.4BK if you wanted to restore backup 0002?

Maybe just a typo?

- Roll forward to regain all data including that record that says
"After BK 0004".

 (This I cannot do. I do not know what log file to open. Even if I
create a new log file, I have the next problem: Trying to integrate
that last numbered segmented log file that is not a segmented log file
(the .4BL) file causes 4D Server to report an error about the log file
not matching the database.)

In your example, assuming you meant to restore [0002].4BK:

1. Restore backed up log file [0003-0004].4BL (you'll need this later)

2. Restore backup [0002].4BK (*ignore* [0002].4BL])

3. Integrate log file [0003-0001]

4. Integrate log file [0003-0002]

5. Integrate log file [0003-0003]

6. Integrate the log file from step 1

7. Integrate the current log file (databasename.4dl)

That's it.

Kind regards,

Josh Fletcher

--

Josh Fletcher

Technical Services Team Member

4D, Inc.

Basil Bourque (7/24/08 4:02 PM)

files?

On Wednesday, July 23, 2008, at 11:37AM, "Josh Fletcher (4D, Inc.)"
wrote:

Did you not finish reading my response? Can you please check again? I

think I already answered these questions.

Nope, my questions remain open...

(A)

You did not answer the crucial question of what log file to use when
first launching a restored database. Look between your steps #2 and #3.

1. Restore backed up log file [0003-0004].4BL (you'll need this later)

2. Restore backup [0002].4BK (*ignore* [0002].4BL])

2.1 Open restored structure and data files with 4D Server.

2.2 4D Server demands opening or creating a log file.

2.3 ???? What do I do?

3. Integrate log file [0003-0001]

4. Integrate log file [0003-0002]

5. Integrate log file [0003-0003]

6. Integrate the log file from step 1

7. Integrate the current log file (databasename.4dl)

Creating a new log file is unappealing. That means waiting another
half hour wait while 4D Server invokes another backup cycle to
activate the new log.

(B)

- What is the .4BL exactly?

- Is it a copy of the current log file in use at the moment of the
backup?

- Why is it a different format than the .4DL ("B" vs "L"), a format
that cannot be used during integration?

--Basil Bourque

 http://www.GridsGoneWild.com/

4D, Inc. (7/24/08 4:10 PM)

files?

Hi Basil,

Basil Bourque wrote:

Nope, my questions remain open...

(A) You did not answer the crucial question of what log file to use

when first launching a restored database. Look between your steps #2

and #3.

You open the oldest log file that corresponds to the backup.

1. Restore backed up log file [0003-0004].4BL (you'll need this

later) 2. Restore backup [0002].4BK (*ignore* [0002].4BL])

2.1 Open restored structure and data files with 4D Server. 2.2 4D

Server demands opening or creating a log file. 2.3 ???? What do I do?

Do step 3.  Change "integrate" to "choose" of that makes more sense.

3. Integrate log file [0003-0001]

(B) - What is the .4BL exactly?

A backed up log file (as stated in step 1).  I apologize if I wasn't

being clear about this.

- Is it a copy of the current log file in use at the moment of the

backup?

Yes.

- Why is it a different format than the .4DL ("B" vs "L"), a format

that cannot be used during integration?

It has been "backed up".  Yes, it is different, that's why you need to

restore it first in step 1.

Kind regards,

Josh Fletcher

--

Josh Fletcher

Technical Services Team Member

4D, Inc.

Reply to this message

Summary created 7/24/08 at 9:53PM by Intellex Corporation

Comments welcome at: feedback@intellexcorp.com