0% found this document useful (0 votes)
2 views

4DBackup_User_Ref

The document is the reference manual for 4D Backup® version 6.7, detailing its features, backup strategies, and recovery methods for Windows and Mac OS. It includes important license information, chapter descriptions, and guidelines for using the software effectively. The manual covers various aspects such as backup strategies, full backup and recovery processes, log file management, and logical mirror setup.

Uploaded by

Alex George
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

4DBackup_User_Ref

The document is the reference manual for 4D Backup® version 6.7, detailing its features, backup strategies, and recovery methods for Windows and Mac OS. It includes important license information, chapter descriptions, and guidelines for using the software effectively. The manual covers various aspects such as backup strategies, full backup and recovery processes, log file management, and logical mirror setup.

Uploaded by

Alex George
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 124

4D Backup®

Reference
Windows and Mac OS Version

© 2000 4D SA /4D, Inc. All Rights Reserved.


4D Backup® Reference
Version 6.7 for Windows® and Mac™ OS
Copyright © 1994–2000 4D SA/4D, Inc.
All rights reserved.

The Software described in this manual is governed by the grant of license in the 4D Product Line
License Agreement provided with the Software in this package. The Software, this manual, and all
documentation included with the Software are copyrighted and may not be reproduced in whole
or in part except for in accordance with the 4D Product Line License Agreement.

4th Dimension, 4D, the 4D logo, 4D Server, 4D Backup, 4D, and the 4D logo are registered
trademarks of 4D SA.

Apple, Macintosh, Mac, Power Macintosh, LaserWriter, ImageWriter, ResEdit, and QuickTime are
trademarks or registered trademarks of Apple Computer, Inc.

Microsoft and Windows are registered trademarks of Microsoft Corporation.

All other referenced trade names are trademarks or registered trademarks of their respective
holders.

IMPORTANT LICENSE INFORMATION


Use of this Software is subject to the 4D Product Line License Agreement, which is provided in
electronic form with the Software. Please read the 4D Product Line License Agreement carefully
before completely installing or using the Software.
Contents

Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
About this Manual. . . . . . . . . . . . . . . . . . . . . . . . vii
Cross-Platform Considerations . . . . . . . . . . . . . . . vii
Hypertext Navigation . . . . . . . . . . . . . . . . . . . . vii
Chapter Descriptions . . . . . . . . . . . . . . . . . . . . viii
Conventions . . . . . . . . . . . . . . . . . . . . . . . . . viii

Chapter 1 Introduction. . . . . . . . . . . . . . . . . . . 11
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Integration with Other 4D Products . . . . . . . . . . . . . . 12
4D Backup as an Independent Application . . . . . . . . . 12
4D Backup with a 4th Dimension Database. . . . . . . . . 12
Installer . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
4D Backup Features . . . . . . . . . . . . . . . . . . . . . . . 13
4D Backup Main Screen . . . . . . . . . . . . . . . . . . . 13
Summary of 4D Backup Functions . . . . . . . . . . . . . 17

Chapter 2 Backup Strategies . . . . . . . . . . . . . . . . 19


Backup Choices . . . . . . . . . . . . . . . . . . . . . . . . . 19
Backup Method . . . . . . . . . . . . . . . . . . . . . . . 19
Backup Location . . . . . . . . . . . . . . . . . . . . . . . 20
Choice of Storage Units . . . . . . . . . . . . . . . . . . . 20
Other Considerations . . . . . . . . . . . . . . . . . . . . . . 21
Educating Your Users . . . . . . . . . . . . . . . . . . . . 21
Making Backups Easy to Use . . . . . . . . . . . . . . . . 22
Avoiding Hardware Problems . . . . . . . . . . . . . . . . 22
Formulating and Testing the Restoration Plan . . . . . . . 24

Chapter 3 Full Backup and Recovery . . . . . . . . . . . . 25


The Full Backup Window . . . . . . . . . . . . . . . . . . . . 25
List of Volumes . . . . . . . . . . . . . . . . . . . . . . . 26
Volume Characteristics . . . . . . . . . . . . . . . . . . . 28
Backup Parameters . . . . . . . . . . . . . . . . . . . . . 30
Enclosures . . . . . . . . . . . . . . . . . . . . . . . . . . 31

4D Backup Reference iii


Contents

Number of Sets . . . . . . . . . . . . . . . . . . . . . . . . 32
Performing A Full Backup . . . . . . . . . . . . . . . . . . . . 36
Backups on Non-Ejectable Volumes . . . . . . . . . . . . . 37
Multi-Volume Backups . . . . . . . . . . . . . . . . . . . . 39
Using the Backup Scheduler (4D Server only) . . . . . . . . 40
Access to the Database During the Backup . . . . . . . . . 43
Generated Files . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Backup Files . . . . . . . . . . . . . . . . . . . . . . . . . 44
Project Files. . . . . . . . . . . . . . . . . . . . . . . . . . 45
Backup Journal . . . . . . . . . . . . . . . . . . . . . . . . 47
Restoring A Full Backup . . . . . . . . . . . . . . . . . . . . . 48
Backup File Contents. . . . . . . . . . . . . . . . . . . . . 48
Restoring a Backup File . . . . . . . . . . . . . . . . . . . 50
Restoring a Segmented Data File . . . . . . . . . . . . . . . 52
Restoring a Segmented Archive . . . . . . . . . . . . . . . 53

Chapter 4 Using a Log File . . . . . . . . . . . . . . . . . 55


The Log File . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Log File Contents . . . . . . . . . . . . . . . . . . . . . . 55
How the Log File Works . . . . . . . . . . . . . . . . . . . 56
Managing The Log File . . . . . . . . . . . . . . . . . . . . . . 58
Creating the Log File . . . . . . . . . . . . . . . . . . . . . 58
Closing the Log File . . . . . . . . . . . . . . . . . . . . . 61
Making the Log File Mandatory . . . . . . . . . . . . . . . 61
Creating a Backup of the Log File . . . . . . . . . . . . . . 62
Restoring the Log File . . . . . . . . . . . . . . . . . . . . 65
Integrating The Log File . . . . . . . . . . . . . . . . . . . . . 65
Recovery of the Backup and Integration of the Log After
Accident . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Integrating the Log File Interactively . . . . . . . . . . . . 68
Using the Restore Log Window . . . . . . . . . . . . . . . 68
Choosing the Log File to Integrate . . . . . . . . . . . . . 70
Viewing the Log File Operations. . . . . . . . . . . . . . . 71
Interpreting the Contents of the Log File Listing . . . . . . 72
Selecting the Fields to be Shown. . . . . . . . . . . . . . . 73
Searching for an Operation . . . . . . . . . . . . . . . . . 74
Integrating Operations . . . . . . . . . . . . . . . . . . . . 75
Integrating Several Log Files . . . . . . . . . . . . . . . . . 77
Quitting the Log File Integration . . . . . . . . . . . . . . 77
Exporting the Log File . . . . . . . . . . . . . . . . . . . . 78

iv 4D Backup Reference
Contents

Chapter 5 Using a Logical Mirror . . . . . . . . . . . . . 79


Setting Up The Mirror . . . . . . . . . . . . . . . . . . . . . . 80
The Database Machine . . . . . . . . . . . . . . . . . . . 80
The Mirror Machine . . . . . . . . . . . . . . . . . . . . . 80
The Network . . . . . . . . . . . . . . . . . . . . . . . . . 80
If Your Data File is Divided into Multiple Segments . . . . 81
If the Structure of Your Database Changes . . . . . . . . . 81
Optimizing a Logical Mirror. . . . . . . . . . . . . . . . . 82
Setting The Parameters . . . . . . . . . . . . . . . . . . . . . 82
Preparing the Database . . . . . . . . . . . . . . . . . . . 82
Setting Parameters on the Mirror Machine . . . . . . . . . 83
Setting Parameters on the Database Machine. . . . . . . . 86
Updating The Mirror Database . . . . . . . . . . . . . . . . . 91
Launching the Update. . . . . . . . . . . . . . . . . . . . 91
Using the Backup Scheduler (4D Server only) . . . . . . . 91
Understanding the Update Process . . . . . . . . . . . . . 94
Recovering From An Incident . . . . . . . . . . . . . . . . . . 98

Appendix A User Environment Errors . . . . . . . . . . . . . . . . . .99


Summary of the 4D Backup Messages . . . . . . . . . . . . . . 99
Full Backup/Mirror Update . . . . . . . . . . . . . . . . . 100
Log File Integration . . . . . . . . . . . . . . . . . . . . . 102
Restarting the Mirror . . . . . . . . . . . . . . . . . . . . 104

Appendix B Rapid Recovery Methods . . . . . . . . . . . . . . . . .105


If Database Execution Stopped . . . . . . . . . . . . . . . . . 105
Recovery Procedures. . . . . . . . . . . . . . . . . . . . . 106
If a Database File Was Lost . . . . . . . . . . . . . . . . . . . 106
Recovery With Complete Backups . . . . . . . . . . . . . 107
Recovery With a Logical Mirror . . . . . . . . . . . . . . . 107
If an Incident Occurs During the Mirror Update . . . . . . . . 107
States of the Databases . . . . . . . . . . . . . . . . . . . 108
State of the Log File Integration. . . . . . . . . . . . . . . 108
Situation 1.The Two Databases Are Intact . . . . . . . . . 109
Situation 2. Only the Original Database Is Damaged . . . . 111
Situation 3. Only the Mirror Database Is Damaged. . . . . 113
Situation 4. Both Databases Are Damaged . . . . . . . . . 113

4D Backup Reference v
Contents

Appendix C 4D Backup and Customizer Plus . . . . . . . . . . . 115


Customizing 4D Backup . . . . . . . . . . . . . . . . . . . . 115
Parameter Options . . . . . . . . . . . . . . . . . . . . . . . 116
Script Manager . . . . . . . . . . . . . . . . . . . . . . . 116
Preferences (Windows Only). . . . . . . . . . . . . . . . 117

Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119

vi 4D Backup Reference
Preface

To keep your data safe, you should guard against hardware-related


breakdowns and human error. 4D Backup protects your data by
enabling you to make backup copies of your databases. You can choose
from several backup methods, from creating a simple backup on disks
to managing a mirror database that serves as a replica of your original
database.

About this Manual


This manual introduces 4D Backup and explains how to use it to
protect your data by enabling you to make backup copies of your
databases. We recommend that you read the first chapter,
“Backup Strategies,” to review the risks to your data and determine
how 4D Backup fits your needs. You should then read the chapters that
correspond to your backup strategy.

Cross-Platform This manual explains how to use 4D Backup on both the Windows®
Considerations and Mac™OS (Power Macintosh) platforms. Although the concepts and
functionality of both versions of 4D Backup are nearly identical, the
manual addresses any differences where necessary. Such differences
may include the graphical user interface and keyboard commands.

The graphics in this manual illustrate 4D Backup in the Windows 95


environment. The two versions of the same screen are only presented
if there are any major differences between them.

Hypertext If you are reading this manual in electronic format (Adobe™ Acrobat
Navigation PDF), you can take advantage of the hypertext links that it contains.
Each word that appears in blue has a hypertext link. In addition, each
entry in the table of contents and index is a hypertext link.

4D Backup Reference Manual vii


Preface

When you click a hypertext link, you immediately move to the page
that contains more information. To return to your original page, click
the Previous page button . You can also move from page to page in
the document by clicking the bookmarks, which are located to the left
of the window that displays the pages.

Chapter This manual is divided into the following chapters:


Descriptions
■ Chapter 1, “Introduction,” provides an overview of 4D Backup.
■ Chapter 2, “Backup Strategies,” explains how to choose appropriate
backup procedures for your database.
■ Chapter 3, “Full Backup and Restoration,” describes how to archive all
components of a database and how to restore archived files.
■ Chapter 4, “Using a Log File,” describes how to create a log file to track
all changes to your database since the last backup.
■ Chapter 5, “Using a Logical Mirror,” shows how to create and maintain
an exact copy of your database on another computer.
■ Appendix A, “User Environment Errors” describes all components of
the 4D Backup error messages that can appear during full backups,
mirror backups, and log file integration
■ Appendix B, “Recovery Methods,” summarizes the procedures for
restoring your database to working condition after an incident.
■ Appendix C, “4D Backup and Customizer Plus,” presents the
parameters that you can set for 4D Backup, using the Customizer Plus
utility.

Conventions This manual uses certain conventions to help you better understand
the material.

The following explanatory notes are used:

Note Text emphasized like this provides annotations and shortcuts that will
help you use 4D Backup more productively.

viii 4D Backup Reference Manual


About this Manual

Throughout the manual, 4th Dimension, 4D Server, 4D Client, and


4D Runtime are referred to simply as 4th Dimension. Differences
among the operation of the products are explained in product-specific
notes.

4D Server Notes like this provide information specific to 4D Backup as used with
4D Server.

4D Client Notes like this provide information specific to 4D Backup as used with
4D Client.

Notes like this alert you to important pieces of information and alert
you to situations where data might be lost.

In addition, all table names are shown in brackets in the text to help
distinguish them from the names of fields, forms, and other items. For
instance, the Companies table is written as the [Companies] table.

4D Backup Reference Manual ix


Preface

x 4D Backup Reference Manual


1 Introduction

This chapter provides basic information about 4D Backup. It includes


the following:
■ An overview of 4D Backup’s capabilities

■ An overview of 4D Backup commands

Overview
An information system—as sophisticated as it is—is only a simulation
machine. As a machine, it presents certain risks of breakdown intrinsic
to all mechanical objects.

People are also subject to error. They can delete the wrong record,
update a series of records using the wrong formula, and so on.

To keep your data safe, you should guard against hardware-related


breakdowns and human error. The best ways of guarding against such
risks are prevention and planning.

4D Backup provides this protection by allowing you to make backup


copies of your databases. You can choose from several different backup
methods, from creating a simple backup on disks to managing a mirror
database that serves as a replica of your original database.

4D Backup is a cross-platform application You can install and use


4D Backup in a heterogeneous configuration. For example, 4D Backup
works transparently with a 4D Server on a Power Macintosh, a mirror
database on a Windows computer and Windows 95 clients. You can
restore or integrate a saved database or log file on any platform,
whatever the original platform was.

4D Backup Reference Manual 11


Chapter 1 Introduction

4D Server uses network components to communicate, offering you a


versatile way to configure your system in a heterogeneous environ-
ment. You can use the entire range of 4D network components (ADSP,
TCP, IPX and Open Transport...) except the Memory network
component.

Integration with Other 4D Products


When you use 4D Backup, you can choose to perform your backups
from the 4D Backup application itself or from inside your
4th Dimension or 4D Server database. To use 4D Backup from inside
your database, you can install 4D Backup in your database as plug-ins
integrated into 4th Dimension.

4D Backup as an 4D Backup can be used as an independent application. You launch it


Independent by double-clicking its icon. From the main 4D Backup window, you
Application can access windows allowing you to perform any backup task.

4D Backup with a When you install 4D Backup in a database, it appears as a plug-in that
4th Dimension can be chosen from the User environment’s Plug-ins menu. If you are
Database using 4D Server, you can also access the plug-in from the Backup menu
in 4D Server’s main window on the server machine.

Most operations, with the exception of database restoration and the


installation of the plug-ins themselves, can be performed from the
4D Backup plug-ins.

Installer You can install 4D Backup as a plug-in in a 4th Dimension or 4D Server


database or as a stand-alone application. Installation is described in
detail in the installation documentation.

12 4D Backup Reference Manual


4D Backup Features

4D Backup Features
4D Backup provides the following options:
■ Full Backup: Make a backup copy of a database.
■ Restore: Restore a database or log file for which a backup copy exists.

■ Restore Log: Display a log of the operations that have occurred since
the last backup, allowing you to restore the database up to a specified
point in the past.
■ Mirror: Manage a mirror database that serves as a replica of the original
database.

4D Backup Main The following figure shows the main control window as it appears in
Screen the 4D Backup application.

You can access the Full Backup and Restore Log features, and also send
updates to the mirror database, from inside your 4th Dimension,
4D Server, or 4D Client application when 4D Backup has been
installed as plug-ins.

The Full Backup and Update Mirror windows are available when the
Backup plug-in is installed. The Restore Log window is available when
the Restore plug-in is installed.

4D Backup Reference Manual 13


!

Chapter 1 Introduction

❿ To open the Full Backup, Restore Log, or Update Mirror windows:


■ Choose the corresponding menu item from the Plug-ins menu in the
User environment’s main menu bar.

4D Server With 4D Server, you can access the Full Backup and Update Mirror
windows from the Backup menu in 4D Server’s main menu bar. The
Restore Log window is automatically displayed when a log file is
present.

14 4D Backup Reference Manual


4D Backup Features

Full Backup

This window enables you to make a complete backup of your database


on another volume.

Restore This window enables you to restore a database or log file from a
previous backup.

Note The Restore option is available only with the stand-alone version of
4D Backup.

4D Backup Reference Manual 15


Chapter 1 Introduction

Restore Log

The log file displays a list of the data operations performed in the
database since the last backup. Once you restore the last backup, you
can use this window to integrate these operations into the database.

Note The Restore Log option is not available with 4D Client. You can only
restore a log in a database on the disk containing both the data file and
the log file.

Mirror

This window enables you to manage a mirror database that resides on a


dedicated machine on the network. You update a mirror database
using the Backup plug-in in the original database. This process requires
a log file (of the original database) sent by the Update Mirror function
to the 4D Backup mirror database.

16 4D Backup Reference Manual


4D Backup Features

Summary of 4D The following table summarizes the main features and options
Backup Functions available in 4D Backup.

Application
Function
4th Dimension1 4D Server 4D Client 4D Backup
Full Backup ✔ ✔ ✔ ✔
Scheduled Full ✔
Backup
Programmed ✔ ✔
Full Backup
Restore
Restore Log ✔ ✔ ✔
Mirror ✔
Update Mirror ✔ ✔ ✔
Scheduled ✔
Update Mirror
Programmed ✔ ✔
Update Mirror

1. Refers to 4th Dimension, 4D Runtime, or a 4D executable database. Res-


tore, update mirror, and full backup options are available as shown when the
appropriate plug-ins are installed in the database.

4D Backup Reference Manual 17


Chapter 1 Introduction

18 4D Backup Reference Manual


2 Backup Strategies

To avoid any loss of data, you should keep one or more copies of your
data on a different volume or medium from the deployed database.

Backup Choices
When choosing a backup strategy, consider the relative safety of:
■ The backup method

■ The location in which the backup will be stored

■ The type of storage unit used for the backup

Backup Method It is important to determine the degree of protection needed for a


database. For example, you do not need the same degree of protection
for a database storing recipes as you do for an accounting database
supporting an entire company’s activities.

The degree of protection that you need helps determine the backup
method best suited for your database:

Original Mirror
database database

Secure More secure Most secure


Periodic, full backup. Periodic, full backup, plus a log A replica (mirror) of the original
file that records operations database that resides on another
since the last backup. machine, plus periodic, full backups
of the mirror database.

See Chapter 2 See Chapter 3 See Chapter 4

4D Backup Reference Manual 19


Chapter 2 Backup Strategies

Backup Location The location in which you save backups also affects the safety of your
backup system:

Backup Location Resulting Protection


Hard disk containing Reduces risks associated with the data file,
original database. but not those associated with the hard disk.
Different hard disk Reduces risks associated with the hard disk,
connected to same but not those associated with the machine.
machine. A problem with the machine could cause
damage to the disks connected to the
machine.
Hard disk connected to Increases level of protection. However, if a
another machine but disaster occurs within the building (a fire, for
located in the same instance), you may still lose your data.
building.

Choice of Storage When deciding on a backup strategy, the choice of storage units must
Units be taken into account. Each one has its advantages and disadvantages.

The choice of storage units also depends on whether you are creating
archives or backups.

Archives Archives consist of information kept for historical purposes. In general,


archives are rarely consulted. Thus, the time required to access the
archives is not crucial. If you want to verify some accounting
information from three years ago, you can tolerate the few minutes it
takes to restore the database from a set of disks.

Archiving is often done on a monthly, semi-annual or annual basis.


Because archiving is performed less frequently than backups, you can
store archives on disks or magnetic tapes that can be placed in a
cabinet or other container.

The following table describes the advantages and disadvantages of


storage solutions for archives:

Storage Type Disadvantages Advantages


Floppy disks Deteriorate over time. Economical.
Small storage capacity.
Writing to disks is slow.
Magnetic tape Slow data access. Reliable.
Additional cost of Economical.
magnetic tape drive. Large storage capacity.

20 4D Backup Reference Manual


Other Considerations

Storage Type Disadvantages Advantages


Removable disks High cost. Reliable and efficient.
(Syquest or Large storage capacity.
magneto-optical) Rapid data access.

Backups Backups consist of information kept to restore a database currently in


use. If 30 people depend on the database to do their work, the time
required to access backups can be crucial.

The following table discusses advantages and disadvantages of storage


solutions for backups.

Storage Type Disadvantages Advantages


Hard disks Machine problems can Maximum backup and
damage connected disks. restoration speed.
Reliability.
Best solution for storing log
files.
Shared volumes Subject to network Physically distant from
problems. machine in use.
Network backups are Good solution for periodic
slower. backups.
Hard disk Same as for previous two. Allows you to increase safety
combined with a by making frequent backups
shared volume (for example, once a day) to
a local hard disk, and then
archiving the database (for
example, once a week) to a
shared volume.

Other Considerations
This section describes some important points to keep in mind when
implementing a backup strategy.

Educating Your If your company has an MIS department, it should encourage


Users homogeneity in the systems, extensions and applications used by
employees inside the company. Such homogeneity should also be
encouraged with the common resources of the company, such as its file
and print servers.

If each employee adds different programs and applications to his or


her machine, you risk software conflicts and possibly database errors. If

4D Backup Reference Manual 21


Chapter 2 Backup Strategies

the software for a hard disk is incompatible with the version of the
system software installed on it, it may render the hard disk unusable.

It is also the role of the MIS department to reinforce the importance of


backups. The user should consider, “What will happen if my hard disk
does not start up this morning? How much work will I have lost?”

Finally, the user must know how to restore the database from the
backup in case of an incident.

Making Backups You should create your backup system so that it requires the least
Easy to Use amount of work from the user or administrator—the ideal being no
work at all.

In general, you should:


■ Avoid situations in which the backup parameters often change
Be sure to choose a backup volume large enough to store the specified
number of sets of backups.
■ Make resetting the parameters easy
For databases that are likely to change, we recommend that you use
backup projects to save your parameters, rather than specifying the
parameters programmatically. In this way, the administrator can easily
redefine the projects. All parameters specified programmatically should
be modifiable by the user or administrator.

For maximum ease of use, backups should be automatic, but the


administrator should be able to change the settings as needed.

Avoiding Hardware Once you have ensured the logical safety of your data using the
Problems methods described, you must consider the physical safety of your data.
To do so, you should analyze the material portion of your information
system in terms of reliability.

The Maintenance of Computers require a minimum of precautions to function well. With


Computers computers, you should guard against excess dust and magnetic fields
that can harm the computer and, more particularly, its hard disk.

Also, make sure that the hard disk is not subject to excessive
vibrations, particularly while it is writing. For example, avoid placing a
printer, which generates vibrations, on the same table as the hard disk.

22 4D Backup Reference Manual


Other Considerations

Lifespan of the Storage To avoid problems, you should decide on a maximum lifespan for your
Unit storage units (floppy disks, cartridges, etc.) and change them regularly.

The lifespan of your storage units depends on a several factors:


■ The nature of the storage unit1

■ The quality of the storage unit

■ The frequency of the backups

■ The quality of the drive


As with hard disks, avoid the influence of magnetic fields. Storing disks
near monitors, which generate magnetic fields, can cause progressive
erasure of the disks.

Uninterruptable Power If possible, you should use a device that provides an uninterruptable
Supply power supply (UPS) to your computers.

UPS devices regulate the electrical current going to your computer. To


guard against power outages, UPS devices contain a battery capable of
maintaining the electrical current for several minutes. In case of a
sudden power outage, the battery power gives you enough time to
properly shut down the system. In this way, clients of a 4D Server
database can disconnect and the server can shut down normally,
without the risk of losing data in the cache or damaging the data file or
hard disk.

If you cannot use UPS devices for all computers, try to use them for at
least the server machine and the mirror machine.

Quality of the Network 4D Server and 4D Client are connected through the network, as are
4D Server and the mirror database. To avoid disturbance of backups by
problems with the network, You need to take particular care with this
element of the system.

The ideal solution is an Ethernet network planned and installed by


network specialists.

The use of bridges that separate the network into distinct zones can be
used to limit the effects of an incident. Only one zone is affected by a
problem and the cause of the problem is that much easier to find.

1. 4D can write to any volume on the operating system (My Computer under
Windows, Finder under MacOS).

4D Backup Reference Manual 23


Chapter 2 Backup Strategies

Formulating and A backup strategy must be accompanied by a strategy for recovering


Testing the the system in case of an incident. How can the database be restored in
Restoration Plan the quickest and most reliable way?

To answer this question, you should formulate a plan of action. This


plan should be tested multiple times by the administrator or user who
will be performing the backups. For each test, the administrator or user
should simulate an incident (for example, deleting the database) and
follow the plan for restoring the database. The tests should be verified
for effectiveness and timed to check if the database can be quickly
recovered.

24 4D Backup Reference Manual


3 Full Backup and Recovery

The most basic features of 4D Backup are the full backup and
restoration of a database.

A backup saves and archives all database components. 4D Backup


provides several methods for creating the full backup. The majority use
the standard backup window, described in this chapter. You can also
perform backups by using procedures or by using the Backup Scheduler
option. For more information, refer to 4D Backup Language Reference
manual.

Restoration allows you to restore files archived by 4D Backup and make


them usable again by 4th Dimension or any other application that
created them. To restore backup files, you must use the 4D Backup
application.

The Full Backup Window


The Full Backup window displays the parameters to set for a full
backup.

You can reach this window in several ways, depending on your mode
of using 4D Backup—whether as an independent application or as a
plug-in installed in 4th Dimension or 4D Server.
■ With 4D Backup as an independent application
Launch the 4D Backup application by double-clicking its icon. Then
click the Full Backup button in the application’s main window.
■ With 4D Backup as a plug-in in 4D Server
Choose Full Backup from 4D Server’s Backup menu.
■ With 4D Backup a plug-in in 4th Dimension or 4D Client

4D Backup Reference Manual 25


Chapter 3 Full Backup and Recovery

Choose Full Backup from the Plug-ins menu in the User environment.
When making a full backup from 4D Client, the Full Backup window
displays the icons from the server machine. Floppy disks are not
displayed.
■ With the 4th Dimension language
After the installation of the backup plug-in, you can use the
BK FULL BACKUP WINDOW command.

This window is composed of three parts: the Destination Volume area


lists the available destination volumes, the Database to Backup area
displays the backup parameters, and the Destination Volume
Information area displays the characteristics of the selected destination
volume.

Note If you are using 4D Backup as plug-in, the Project menu appears at the
top of the window. If you are using 4D Backup as an independent
application, this menu appears in the main menu bar.

List of Volumes The Destination Volume area lists all volumes connected to the
computer.

The following illustration shows a typical list of volumes:

26 4D Backup Reference Manual


The Full Backup Window

Macintosh

Windows

For floppy disks, each volume is represented as either:


■ The icon of the disk drive, if the drive does not currently contain a
disk. (In this case, the name of the drive is written in italics.)
■ The icon of the disk itself, if the disk is currently inserted in the drive.

Note For ejectable volumes other than floppy disk drives, the icon appears
only if the volume is inserted. An empty drive does not appear.

Types of Volumes All other volumes logically or physically present on the machine are
then listed. These can be any type: hard disks or partitions of hard
disks, volumes connected by a network, magneto-optical cartridges,
Syquest cartridges, tape backups and so on.
■ On Mac OS, the disk volumes are represented by the disk icon if the
disk drive is empty (the volume name appears in italics) or by the disk
icon if the disk is in the drive. For ejectable volumes other than disks,
the icon does not appear if the volume is not mounted. An empty
volume will not appear.
■ On Windows, the volumes are represented as they are in the File
Manager and are identified by a letter. All available volumes are
identified, even if the disk is not inserted.

Navigating the List If the list of volumes is larger than the window area, arrows appear on
either side of the area rectangle. Clicking either arrow scrolls the list.

Updating the List The list of volumes updates automatically when disks are ejected or
inserted (on MacOS), or if you connect or disconnect from shared
volumes.

Selecting the You select the backup destination volume by clicking its icon in the
Destination Volume Destination Volume area.

4D Backup Reference Manual 27


Chapter 3 Full Backup and Recovery

Volume The Destination Volume Information area displays the characteristics


Characteristics of the selected volume.

Selected destination
volume

Destination volume
information

If no volume is selected, this area does not contain any information.

Name This line provides the name of the volume.

Available Space This line provides the available space on the volume. In the case of
floppy disks, this line always indicates the size of the floppy disk
because 4D Backup formats and uses the entire floppy disk.

Volume Size This line displays the total capacity of the volume if the volume was
empty. In the case of ejectable disks, the volume size also gives an
indication of the type of formatting used for the volume.

Required Volumes A major feature of backup files is the ability to be segmented over
several volumes if the file size exceeds that of a single volume. Note
that it is possible to segment backups only if you choose to back up on
an ejectable volume.

If the size of the backup file is greater than the maximum size of the
selected volume, 4D Backup displays the following information:

You must prepare the number of volumes required to complete the


backup.

28 4D Backup Reference Manual


The Full Backup Window

In the case of a backup on floppy disks, if there is no disk in the disk


drive and the disk drive accepts several disk formats, 4D Backup
calculates the number of disks required based on the maximum
capacity of the disk drive. If the disk drive contains a disk, 4D Backup
calculates the number of units necessary based on the capacity of this
disk.

Attributes This line provides information specific to the volume. The different
possibilities are:
■ Locked: The volume is locked. This can be either because the volume is
a floppy disk with a write-protected tab, or because it is a volume that
has been locked using software. In either case, 4D Backup does not
allow the backup to take place.
■ Empty: This attribute applies only to ejectable volumes such as floppy
disks. It indicates that the volume has been ejected.
■ Ejectable: The disk can be physically ejected. Disks of this type include
floppy disks, Syquest cartridges, magneto-optical disks and even
certain hard disks that can be removed from their docking station.

On Macintosh, to determine whether or not a disk can be ejected


without using 4D Backup, click its icon in the Finder and then pull
down the Special menu to see whether or not the Eject Disk menu item
is active. Volumes considered ejectable at the level of the Finder will be
considered ejectable by 4D Backup.

Note that certain ejectable volumes, such as magneto-optical


cartridges, cannot be ejected in this way (you must choose Quit from
the File menu or place the volume in the trash can). These volumes
cannot be ejected by 4D Backup. They also cannot receive a segmented
backup.

If the selected volume is ejectable, the Eject button is active, allowing


you to eject the disk.

On Windows, disks can only be manually ejected. Therefore, the Eject


button does not appear.

Note If you are using ejectable volumes such as Syquest drives, the Erase
Volume check box appears. If you select it, the volume will be entirely
deleted and renamed at the time of the backup. By default, 4D Backup
does not erase these volumes.

4D Backup Reference Manual 29


Chapter 3 Full Backup and Recovery

If you are using ejectable volumes other than floppy disks, the Erase
Disk check box appears in the Destination Volume Information area:

If you check the Erase Disk check box, 4D Backup will erase the volume
before making the copy.

Verifying the Backup If you check the Verify Backup check box, 4D Backup will verify (after
the backup) whether or not it can correctly reread what it has just
written to disk. This option decreases the speed of operation, but
provides greater protection.

Backup Parameters The Database to Backup area displays information about the backup
and its parameters.

The following information is displayed:


■ Selected files (the names of the data, structure, and log files)

■ Enclosures (any files associated with the database, such as templates for
labels or quick reports)
■ Date of the last backup of the database

■ Number of the backup that will be performed

■ Number of sets of backups to be kept


■ Total size of the selected files

Note The Log File check box appears only if you are using 4D Backup as
plug-ins. If no log file has been generated for the database, the

30 4D Backup Reference Manual


The Full Backup Window

check box remains dimmed. The backup of the log file is described in
detail in the next chapter, “Using a Log File.”

Enclosures If your database uses other files, such as 4D Write style sheets or label
templates, you can ensure that they are backed up at the same time as
the database. In case of a hard disk malfunction, you can restore not
only the database, but also the files that were used with it.

To select enclosures, click the icon representing a paper clip:

The following window appears:

Button to add files


Button to remove a
file from the list

If you click the Add button, a standard Open File dialog box appears.
When you select a file and click Open, the file is added as an enclosure.

Note You cannot select a data, structure or log file. You also cannot select
plug-ins in the Mac4DX or Win4DX directory.

You can use the Remove button to remove a file from the list. Clicking
this button will not delete the file from the disk; it will only ensure
that the file is not backed up.

Note From 4D Client, you can only view the list of enclosures, because these
files are stored on the server machine. You must add and remove
enclosures on the 4D Server machine.

When you have finished, click OK.

When the backup window reappears the Enclosures line displays


additional information about your selection.

4D Backup Reference Manual 31


Chapter 3 Full Backup and Recovery

■ If you have selected a single file, its name is displayed:

■ If you have selected several files, only the number of files is displayed:

It is possible that one or more files may not be accessible at the time of
the backup; for example, if the file’s pathname has been modified or if
the file has been opened by another application. In this case, an alert
box indicates the problem after the backup operation. The backup
journal also reports the error, including the name of the file and the
reason for the incident.

Note For more information on the journal file, refer to “Backup Journal” on
page 47.

Number of Sets The number of sets is the number of backups that you want to keep for
a database. Without this parameter, the backups would accumulate on
the backup disk, which would rapidly become full. To avoid this
situation, you define the maximum number n of successive backups.
4D Backup keeps the n most recent archives and erases the older ones.

You can determine the maximum number of backups using the


following formula:

Space available for the backups


Maximum Number of Sets = 1 set
Maximum size of a backup

The formula subtracts one from the maximum number of sets because
4D Backup first performs the current backup, and then erases the oldest
archive from the disk.

The number of sets, along with the frequency of the backups,


determines how far into the past you can take your database. Imagine
that you back up once a week and you save the four last backups. You
can then repair an error that happened up to four weeks earlier. If you
notice that a record was erased by mistake three weeks earlier, you can
retrieve that record by using the earliest backup.

32 4D Backup Reference Manual


The Full Backup Window

Archiving a Particular If you want to save a particular backup for an indefinite period of time,
Backup you should ensure that it is not erased when the maximum number of
sets is reached. You have several options for doing this:
■ At the level of the Finder, rename the backup to be saved. To do this
procedurally instead, you could use the BK SET FILENAME command.
■ At the level of the Finder, move the backup into a folder other than the
folder in which the backups are saved.
■ In the backup window of 4D Backup, hold down the Option key (on
MacOS) or Alt (on Windows) while clicking the Backup button. A
standard Save File dialog box appears. You can then choose a new
name or location for the current backup.

Note Press Cancel to avoid overwriting backups.

Setting Backup Options The 4D Backup Preferences dialog box allows you to set backup
options.

To display this dialog box, choose Preferences from the File menu
when the full backup window is displayed1. The Preferences dialog box
appears.

This dialog box contains three options:


■ Delete oldest archive before creating a new one.
This option allows you to delete the oldest backup on the backup
volume before a new one is created.

1. If you are running 4D Backup as a plug-in, the Preferences menu item is in


the Project menu.

4D Backup Reference Manual 33


Chapter 3 Full Backup and Recovery

The display of the available disk space now takes into account this
particular mode. The available disk space includes the space that will
be freed by deleting the old archive.

Note It may occur that the oldest archive is not deleted before creating the
new one. To delete the oldest archive, 4D Backup searches for the
archive named “MyBase[number of backup]+(Number of the segment,
if the database was segmented). If 4D Backup doesn’t find such an
archive in the current backup destination directory, it will not delete it
and will not free space before creating the new archive.

This option turns out to be particularly useful if you wish to backup a


database on a backup volume that does not have the necessary space to
hold both the older backup and the backup in process.

However, if the backup in process is interrupted, you cannot access the


older backup, because it has already been deleted, or the backup in
process, because it was not able to finish. But, because the database
cannot be modified during the backup, you are assured that the data
file is intact, even if you no longer have a valid backup. It is analogous
to having a flat spare tire even though the other four tires on your car
are intact. Once the system is restarted and the incomplete archive is
deleted, you can immediately start a new backup.

■ Increment the backup counter when backing up only the structure.


The number of the backup set corresponds to the database backup; it is
not incremented if only the structure is backed up. If you periodically
backup the structure of your database without backing up the data, the
backup number is not incremented and the previous backup is
replaced. However, if you have selected this option, the backup
number is incremented when you backup only the structure, thus
allowing you to save as many backup sets as you want.
This option is particularly useful during the development phase of a
database. In this case, you can frequently backup the structure of the
database without backing up the data file, which contains only test
information. You can save a backup of the structure file every quarter
of an hour. This allows you to easily return to a previous structure in
which you hadn’t already modified a procedure, deleted a layout, and
so on.

34 4D Backup Reference Manual


The Full Backup Window

■ Maximum archive segment size.


This option enables you to specify the maximum size of archive
segments generated by 4D Backup. This facilitates backups of very large
databases that generate backup files of several hundred megabytes. It
thus enables you to properly repartition the segments for the available
space on the backup volumes. The resulting segments of a backup may
be saved either on different volumes or different folders on the same
volume. (This does not apply to backups to floppies.)

Note For more information on segmenting backups, see the section “Multi-
volume Backup”.

❿ To set the maximum size of the archive (backup) segments:


1 In the Preferences dialog box, check the “Maximum segment size”
check box.
2 Type the value in the text box.
The value is expressed in megabytes (MB).

Note The default size is 2048 MB; this is the maximum size of a data
segment. The minimum size is 1 MB. If you enter a smaller value, it
will be increased to 1 MB automatically.

3 Click the OK button.


During the backup, when the specified size limit of a segment is
reached, 4D Backup will close the segment and display a “Save file”
dialog box to allow you to select the destination of the following
segment. 4D Backup stores, in the backup project, the destination of
each segment of the archive, and the same locations will be used for
the next backups.

Note To reorganize the distribution of these segments on your disks, select


the icon of the new destination volume, click the Alt key (Windows) or
Option key (Macintosh) while clicking on the Backup button; this
redisplays the save-file dialogs.

4D Backup Reference Manual 35


Chapter 3 Full Backup and Recovery

Performing A Full Backup


Once you have specified all the parameters for the backup, you are
ready to back up your database.

This section explains:


■ How to launch a backup

■ How 4D Backup executes when you back up on non-ejectable volumes

■ How 4D Backup executes when you back up on ejectable volumes

■ How to perform a backup on multiple volumes


■ How the user can interact with the database during a backup

■ How to automate backups using the backup scheduler (4D Server only)
Once you have specified all the parameters for the backup, you are
ready to backup the database.

❿ To launch the backup:


1 Click the Backup button.
A save-file dialog box appears, allowing you to choose a new location.
2 Select the destination volume and directory and click Save.
Two indicators display the progress of the operation.

The upper meter indicates the progress of the copy, and the lower one
indicates the percentage of space used on your disk out of the total
space available.

At the end of the backup, 4D Backup displays an alert that allows you
to save modified parameters. Click Yes to save the parameters so that
you can reuse them for subsequent backups.

If you use a previously saved backup project, clicking the Backup


button automatically saves the backup in the same place as before. To
choose another destination, select the icon of the new destination
volume, hold down the Alt key (Windows) or Option key (Macintosh)
while clicking the Backup button. A save-file dialog box appears,
allowing you to choose a new location.

36 4D Backup Reference Manual


Performing A Full Backup

Note If you use a previously saved backup project, and 4D Backup displays a
save-file dialog box when you click Backup, it means that the path to
the archives has been modified.

The execution of a backup will vary according to the attributes of the


volume on which the backup is performed. 4D Backup distinguishes
between two types of volumes:
■ Non-ejectable volumes (hard disks, shared volumes, etc.)
■ Ejectable volumes (floppy disks, Syquest cartridges, etc.)

Backups on Non- When you click the Backup button to start the backup, a standard Save
Ejectable Volumes File dialog box appears for you to choose the location of your backup.

If you have a previously saved backup project, clicking Backup


automatically saves the backup in the same place as before, without
presenting the dialog box. To choose another destination for the
backup, select the icon of the new destination volume, hold down the
Option key (on MacOS) or Alt (on Windows) while clicking the Backup
button. In this case, the Save File dialog box appears, allowing you to
choose a new location.

If the volume becomes full prior to the end of the backup or the
segment archive size reaches its maximum value, 4D Backup will
present a standard choose file dialog box, allowing you to choose a
new destination on which to proceed with the rest of the backup.

Note When backing up databases, you can specify a maximum size for the
file segments, which permits you to segment your database prior to
filling the volume. For additional information on this topic, see the
section “Backup Parameters” on page 30.

4D Backup distinguishes between floppy disks and other types of


ejectable volumes.

Floppy Disks When you perform backups on floppy disks, 4D Backup systematically
erases the disks and, on MacOS, renames them.

When you click the Backup button, 4D Backup alerts you that the disk
will be erased.

4D Backup Reference Manual 37


Chapter 3 Full Backup and Recovery

Macintosh

Windows

Note On MacOS, the Eject button allows you to change disks before
performing the backup. On Windows, this button does not appear. You
must manually eject disks in order to change them.

To perform the backup and erase the disk, click the Erase button.
4D Backup erases the disk when the backup begins. Note that all files
and folders on the disk will be erased. You should, therefore, dedicate
certain disks for backup purposes only.

If you do not want to erase your disk, on the Macintosh, click the Eject
button to eject it. On Windows, you must eject the disk manually

Disk Name (MacOS 4D Backup renames the disks so that you can determine a disk’s
only) contents at a glance. The disk name consists of the name of the
database, plus the backup number between brackets. For example, a
disk containing the 56th backup of the MyBase database will be named
“MyBase[56]”. The Erase button formats the floppy disk, so you can use
unformatted floppy disks to backup (If PC Exchange or equivalent is
installed, you can use Macintosh or PC disks.). On Windows, the Erase
button executes a Quick Format, which only deletes the files on the
disk. Therefore, you must use a PC formatted disk to backup.

Note In the case of a backup segmented over several disks, 4D Backup adds
the number of the segment to the name of the disk (for example,
“MyBase[56].3”. For more information on segmenting backups, refer to
“Multi-Volume Backups” later in this chapter.

38 4D Backup Reference Manual


Performing A Full Backup

Ejectable Volumes Other If you use ejectable volumes other than floppy disks, the Erase Disk
than Floppy Disks check box appears in the Destination Volume Information area.
■ If you checked the Erase Disk check box in the Destination Volume
Information area, 4D Backup will erase the volume before making the
copy. On Macintosh, two alert dialog boxes will appear at the time of
the backup: the first reminds you that the disk is going to be erased;
the second asks you for the new name of the disk. On Windows, one
alert dialog box appears at the time of backup that reminds you that
the disk is going to be erased.
■ If you do not check the Erase Disk check box, 4D Backup uses only the
available space. When you click the Backup button, a standard Save
File dialog box appears for you to choose the location of the backup
file on the selected volume.

Note If you have a previously saved backup project, clicking the Backup
button automatically saves the backup in the same place as before,
without presenting the dialog box. To choose another destination for
the backup, select the icon of the new destination volume and hold
down the Option key while clicking the Backup button. In this case,
the Save File dialog box appears, allowing you to choose a new
location.

Multi-Volume 4D Backup can segment backup files over several volumes if the file
Backups size is greater than that of a volume or the size allowed for a segment
(defined in the Preferences dialog box). If the size of the backup file is
greater than the size of the selected volume, 4D Backup displays the
following information (for example):
Available space on the volume
Maximum capacity of the volume
Number of volumes required to
backup the selected files

In the case of a backup on diskettes, if the floppy drive is empty,


4D Backup calculates the number of diskettes required, based on the
diskette size accepted by your machine.

If the floppy drive contains a diskette, 4D Backup estimates the


number of disks required, based on the capacity of that diskette. You
can, however, perform the backup using diskettes of varying capacities.

4D Backup Reference Manual 39


Chapter 3 Full Backup and Recovery

Volume Names (Mac OS On Macintosh, at the time of the backup, 4D Backup renames each
only) volume and adds the number of the segment. 4D Backup makes it easy
to identify the contents of a disk. For example, for a disk named
“MyBase[56].3”(Macintosh):

Macintosh disk
Description of name component
MyBase[56].3
Name of database MyBase
Indicates that the disk contains the [56]
56th backup of the database
Indicates that the disk constitutes the .3
third segment (that is, the third disk)
of the backup

Once the backup has been completed, 4D Backup asks you to reinsert
the first disk, so that it can update the information concerning the
backup (the number of segments and the name of the volumes
containing the different segments).

Remarks The most frequent use of a backup segmented over several volumes is
the backup on floppy disks. This type of backup is perfectly adapted to
backups of small databases. It is also practical for occasional archiving.

By multiplying the number of disks required for a backup by the


number of sets of backups you save, you can obtain the total number
of disks that you must dedicate to your backups. We recommend that
you prepare and label your disks with the name of the database, the set
number and the segment number.

On the label, you should also note the date on which you started to
use the disk. The quality of a disk starts to degrade after a certain
number of uses. We recommend that you set a maximum lifespan and
replace the disks after this period.

Using the Backup You can automate the backups of a database opened with 4D Server,
Scheduler even if a client is not connected to it. In the same way you can
(4D Server only) automate an Update Mirror.

When you have installed the backup plug-in in the directory of the
database used by 4D Server, the following window appears on the
server machine.

40 4D Backup Reference Manual


Performing A Full Backup

The upper portion of the window enables you to program full backups;
the lower portion of the window enables you to program mirror
updates.

Before you set your automatic backup, create a backup project


manually by executing the first backup with 4D Backup’s interface.
Name your project “Backup Project” (Macintosh) or “Backup.4BP”
(Windows), which is the default name of the project used for the next
automatic backup.

❿ If you don’t have such a project, create it as follows:


1 Use the Full Backup item in the Plug-ins menu (in 4th Dimension) or
use the Full Backup option in the 4D Backup standalone application.
2 Once you have specified all the parameters for the backup, click the
Backup button to set the destination volumes.
3 At the end of the backup, save the new project by clicking Save when
you are prompted to save the backup parameters as a project.
4 When you save the project, use the default name “Backup.4BP”
(Windows) or “Backup Project” (Macintosh).

For information on mirrors, see Chapter 5, “Using a Logical Mirror”.

Frequency of Updates For each backup mode, the check box activates or inactivates the
automatic backup. The number and the pop-up menu allow you to
manage their frequency.

The text below the check box has two functions:


■ It informs you of the next backup date and time

■ It informs you of an error if the preceding backup has not taken place
correctly

The time of the next backup is calculated according to the time at


which you define the frequency settings.

4D Backup Reference Manual 41


Chapter 3 Full Backup and Recovery

❿ To set the starting time of the backup:


■ Click the watch icon.
The following dialog box appears:

The two entry areas allow you to enter the date and time of the first
backup. The next backup will take place at the specified time and date,
and the following backups will take place at the indicated interval
(Week, Day, Hour, Minute).

If the Backup Fails If you check the Display an Alert Box if the Backup Fails check box, the
following alert box appears if the backup was not successful:

No new backup will begin until the database administrator clicks the
OK button in this alert box.

Backing Up Only if the If you have a database that is permanently running, you should check
Database is Modified the Backup Only if the Database is Modified check box. This will
prevent you from making multiple identical backups, such as over a
weekend when no modifications are being made.

You can update the mirror database in the same manner. For example,
a mirror can take place every two hours and the updates will stop
automatically at night and on the weekend. For details on mirrors, see
Chapter 5, “Using a Logical Mirror.”

42 4D Backup Reference Manual


Generated Files

Access to the 4D Backup makes a copy of the data during the full backup process, so
Database During the it does not allow changes to be made to the data until the backup is
Backup finished.

If you are using 4th Dimension, you cannot read or write data, and all
processes are frozen. In effect, you cannot use the database during the
backup process.

If you are using 4D Server, all clients can read data, but they cannot
write data. If a client sends a request to add, modify, or delete data, a
message alerts the client that the operation must wait for the end of
the backup process.

If the client does not want to wait, the client can click the Abort
button. Note that if the operation was started by a method, aborting
the method may lead to logical inconsistencies.

When the backup is finished, the window disappears and the


operation is performed.

Generated Files
4D Backup can generate the following types of files:
■ Backup files: There are two types of backup files: The Database backup
file contains the database files, enclosures, or information used to
reconstruct it. It may be segmented.The Log Backup file contains only
the log file.
■ Project files: Contain the parameters you set when you back up a
database or create a mirror database.
■ Backup Journal: Summarizes the operations concerning the backup of a
database.

4D Backup Reference Manual 43


Chapter 3 Full Backup and Recovery

Backup Files 4D Backup generates two types of backup files:

■ Full backups

■ Log file backups

Full backup Log file backup

Not only can you use either of these files to restore several files
(structure, data, and enclosures), but they are also protected by a
system of internal verification. This means that after the restoration of
the files, 4D Backup can determine whether any of the files have been
altered since the backup; alterations can be caused by defective sectors
in your disk, viruses, or even system errors.

Internal Verification If the alteration to the file is not very serious (not more than 2% of the
file modified), 4D Backup will automatically repair it and will display
the following message:

If the alteration is serious, the following message appears:

In this case, the files are not restored and you must use an earlier
backup. If you have saved the corresponding log files, you can
integrate the missing operations to recover the current database.

44 4D Backup Reference Manual


Generated Files

Note The appearance of either of these messages indicates that there may be
a serious problem that you need to take care of, such as a damaged
system, a virus, or even a defective sector on your hard disk. In such a
case, you should consider preventative measures such as reinstalling
your system, using an anti-virus application, or verifying your hard
disk using a disk recovery utility.

Project Files A project is a file containing all the parameters that you have set for a
backup. Using a project allows you to save and reuse parameters and to
launch a backup immediately.

You can use projects for three of 4D Backup’s features:


■ Full backups

■ Mirror updates

■ Backups of mirror databases

After having set your parameters in the Full Backup and/or Update
Mirror window, you can save them in a project file, which is named
“Backup Project” by default. To launch your backups or mirror
updates, double-click the project’s icon. 4D Backup performs the
backup or mirror update using the parameters in the project file.

The parameters for the full backup and for the update of the mirror can
be stored in the same project file. 4D Backup uses the correct set of
parameters for each feature.

When you set parameters for the backup of a mirror database, you can
also save the parameters in a project file, which is named Mirror
Project by default. Mirror Project files are discussed in more detail in
Chapter 5, “Using a Logical Mirror”. The following discussion pertains
only to Backup Project files.

Note To select a backup destination other than that saved in the project,
hold down the Option (on Macintosh) or Alt (on Windows) key while
clicking the Backup button.

The parameters saved in a project are:


■ Backup mode (backup or mirror update)

■ Backup volume and pathname to the backup file

4D Backup Reference Manual 45


Chapter 3 Full Backup and Recovery

■ Files to be saved: structure, data and log

■ List of enclosures and pathnames

■ Parameters for the copy: settings of the Preferences window, whether


to verify the copy, and whether to erase the volumes
■ Zone and the name of the selected mirror machine (for a mirror
update)

Note The number of sets to be retained is stored in the data file rather than
in the project file. This feature is intended to prevent you from
accidentally deleting archives when switching between projects. The
date and time of the last backup, as well as the number of the backup,
are also kept in the data file.

Creating a Project Creating a project is simple. If you modify any of the preceding
parameters in the Full Backup or the Update Mirror window,
4D Backup will ask you if you want to save your parameters in a
project.

You can also create a new project or open an existing project at any
time using the Project menu in the Full Backup or Update Mirror
window.

If you are using 4D Backup as an independent application, these menu


items appear in the File menu in the main menu bar.

The name of the current project appears in the title of the backup
window.

Using Default Projects You can define a default backup project for each database. This project
will be automatically opened and its parameter set for each backup
window used by 4D Backup. Also, the default project is used by all the
automatic 4D Backup functions (Backup Scheduler and language
routines).

46 4D Backup Reference Manual


Generated Files

In order to be properly used, the default project should conform to the


following rules:
■ By default, the project file is named “Backup Project” (on MacOS) or
“Backup.4BP” (on Windows). If you save this name, the project file will
automatically be used for any backups.
■ The project is placed in the same level (folder or directory) as the
database.

Note The name of the current project appears in the title of the backup
window.

Backup Journal 4D Backup summarizes each backup operation in a journal file,


allowing you to review and verify what you have done. This file
describes all operations concerning the backup of a database—backups,
restorations and log file integrations. The operations are listed, along
with the date and time they took place and the name of the user who
originated them.

The journal file is placed in the database folder.


■ On MacOS, the file is named “Backup Journal”. The journal file is
created in TeachText, the text editor furnished with your Macintosh
system software.
■ On Windows, the file is named “Journal.TXT”. It can be opened with
any text editor.

When you double-click the icon of this file, the text editor displays the
journal’s contents.

4D Backup Reference Manual 47


Chapter 3 Full Backup and Recovery

A backup journal file cannot contain more than 32,000 characters of


text. When the journal file becomes full, it is renamed “Backup
Journal.1” (on MacOS) or “Journal1.txt” (on Windows), and a new
journal file is created to record new operations. When this file reaches
32,000 characters, it is in turn renamed “Backup Journal.2” (on
MacOS) or “Journal2.TXT” (on Windows), a new file is created, and so
on.

The most recent journals are the most important; you can delete the
oldest ones without risk.

If a file with this name already exists, 4D Backup renames it “Backup


Journal.2”, and so on.

Restoring A Full Backup


Restoring a backup consists of extracting the files contained in the
backup file and rendering them once again readable by the application
that created them. Note that restoration of backup files can be
performed only from 4D Backup as an independent application.

Backup File Remember, 4D Backup generates two types of backup files:


Contents
■ Full backups: MyBase[10].1 (Macintosh) or MyBase10-1.4BK and
ByBase10-1.4R (Windows).
■ Log file backups
On Windows, the full backup is composed of two files.

Full Backup File Full backup files can group a number of files in one document. You can
thus fully backup your environment.

The following diagram illustrates the contents of a full backup file:

48 4D Backup Reference Manual


Restoring A Full Backup

Log File Backup The backup of a log file contains only file, the log file:

For information on restoring a log file, refer to Chapter 4, “Using a Log


File.”

Contents of Backup Files The following table summarizes the backup files generated by
4D Backup :

4D Backup Reference Manual 49


Chapter 3 Full Backup and Recovery

Selected Backup files Name of backup file


elements MacOS Windows MacOS1 Windows2
Full Structure file MyBase MYBASE.4DB Name of structure file Name of structure file +
backup MYBASE.RSR + [number of the number of the backup +
Data files (2) MyBase.data MYBASE.4DD backup] extension.4BK
MYBASE.4DR Example : MyBase[3] Example :
MYBAS003.4BK
Enclosure All files: not in the Mac4DX or MYBAS003.4BR(1)
files Win4DX folders, files of other (8 characters)
applications...
Log file Log file MyBase.log MYBASE.4DL Name of log file + Name of log file +
backup [numbers of the back- number of the full backup
ups in the log] file + extension .4BL
Example : Example : MABAS003.4BL
MyBase[2to3]

1. If the data file is segmented, the number of the segment is added to the name.
2. If the data file is segmented, the first segment is named MyBase10-1.4BS (1 is the number of the seg-
ment).

(1) In Windows, the backup is composed of two files, the .4BK backup
file and the .4BR file. The .4BR file contains the description of the
archive contents and is used automatically by 4D Backup to recreate
the file “.4BK”. When using backup segments, this file only appears
with the first segment.
(2)If the data file of the database is segmented into multiple files, you
should include these files in the backup. For additional information on
this topic, refer to the section “Restoring a Segmented Data File”.

Restoring a Backup Restoration of a full backup file can be performed in three steps:
File
■ Choose a backup file to restore
■ Select the elements to restore

■ Choose a location for the restored files

❿ To restore a backup file:


1 In 4D Backup’s main window, click the Restore button.
OR
Choose Restore in the File menu.

50 4D Backup Reference Manual


Restoring A Full Backup

An Open File dialog box appears.


2 Choose the full backup file (*.4BK on Windows) that you want to
restore.
The Restore window appears:

This window provides information on the contents of the backup and


allows you to choose, before executing the restoration, the files to be
extracted.

You can choose to restore the data file, the structure file, or both, by
selecting the check boxes associated with them. By clicking the
elements in the list of associated files, you can select the enclosures
that you want to restore. A check mark appears next to the names of
selected files.
By default, all files are selected and will be restored. The Select All and
Deselect All buttons allow you to accelerate your selections.
■ Disk Verification
The Verify option allows you to verify the backup was not performed
on a damaged hard disk.
Like the Verify Backup option, this option re-reads the written data
and verifies that it corresponds to the original data. This function
slows down the backup, but insures that you have written on a
operational disk.
3 Specify the files you wish to restore.

4D Backup Reference Manual 51


Chapter 3 Full Backup and Recovery

4 Click the Restore button to extract the selected files from the backup.
A standard Save File dialog box appears, asking you to specify the
folder that will contain the restored files.

By default, the proposed directory (folder) name is as follows:


■ On MacOS, the proposed folder name is the name of the database
followed by “ƒƒ”. Remember that, upon creation, a 4th Dimension
database is automatically placed in a folder whose name is the name
of the database followed by “ƒ”.
■ On Windows, the proposed directory name is the name of the data-
base followed by the extension “.RST”.
Because of these naming conventions, you will easily be able to
differentiate between the original databases and the restored backups.
5 On MacOS, click Save to start the restoration process.
On Windows, click OK.
During the restoration process, 4D Backup places all the backup files in
the destination folder in a position identical to their relative position
at the time of backup. This makes it easy to locate your backup files.

Restoring a If the database contains a segmented data file, 4D Backup does not
Segmented Data automatically restore the data file segments in the proposed folder.
File
A segmented data file may exceed the capacity of a single disk. For this
reason, 4D Backup displays a standard Save File dialog box for each
segment being restored. This allows you to restore the segments on
different disks.

If a selected disk does not have sufficient capacity to store the segment,
an alert box appears. You can then select another volume.

52 4D Backup Reference Manual


Restoring A Full Backup

Restoring a If the backup itself is segmented over several volumes (for example, in
Segmented Archive the case of floppy disks), you must first open the backup file on the first
disk (.4BK on Windows; MyBase[10].1 on Macintosh). When you open
this backup file, 4D Backup displays the Restore window.

When you have finished making your selections, click the Restore
button to begin the restoration. Depending on the files you have
chosen to extract, you will be asked to insert different disks.

4D Backup Reference Manual 53


Chapter 3 Full Backup and Recovery

54 4D Backup Reference Manual


4 Using a Log File

Regular backups allow you to restore your database to its state at the
time of the last backup. However, you may also want to restore data
entered or modified since the last backup.

To avoid losing changes made after a full backup, you can create a log
file for your database. When created just after a full backup, a log file
keeps track of all changes to the data in your database since the last
backup. With this file, you can restore your last full backup and then
integrate any subsequent changes to produce a completely updated
version of your database.

The Log File


A log file is a standard document that contains a chronological listing
of all operations performed on your data.

Log File Contents The log file saves four types of data operations:

■ Additions

■ Modifications
■ Deletions

■ Transactions
The log file takes into account all data operations, regardless of
whether the changes are initiated by a user or through 4th Dimension
commands. The log file even records changes initiated by related appli-
cations, such as third-party plug-ins, 4th Dimension plug-ins (4D Draw,
4D Write, and so on) and even 4D Open.

4D Backup Reference Manual 55


Chapter 4 Using a Log File

Note 4D Open is 4th Dimension’s Application Programming Interface (API).


Using 4D Open, non-4D Client applications can connect to a
4D Server database, view data and even make changes to that data.

Transactions A transaction is a group of operations executed in a block. Transactions


allow you to handle situations in which either all or none of the
operations in the transaction should be executed. 4D Backup considers
a transaction to be a single operation.

A bank credit transfer provides a good example of the use of a


transaction. Such a transfer consists of a debit to one account and a
credit to another account. Both operations must take place—the first
account cannot be debited without the second account being credited.
Thus, these operations are part of a transaction. Either both parts of
the transfer occur, or neither does.

For more information on transactions, refer to the 4th Dimension


documentation.

How the Log File The log file is managed by 4th Dimension applications. It keeps track of
Works all additions, modifications, deletions and transactions in your
4th Dimension or 4D Server database. When you perform any of these
operations, two things occur:
■ The data in the database is modified according to the operation

■ The modification is recorded in the log file

The following diagram provides a conceptual overview of how the log


file records the changes to the data:

56 4D Backup Reference Manual


The Log File

Data file Operations Log file

Creation of empty log Header of the log file


Type of operation
Contents
a Addition of “a”
+a 0
Record number

a Addition of “b”
b +a 0
+b 1

aa Modification of “a” to “aa”


+a 0
b
+b 1
x aa 0
aa Addition of “c”
b +a 0
c +b 1
x aa 0
+c 2

aa Deletion of “b”
c +a 0
+b 1
x aa 0 + addition
+c 2 – deletion
–b 1 x modification

Note that the log file keeps track of the operation that occurred and
the record involved in the operation.

4D Backup uses this information when you want to redo any of the
operations to restore the changes made to your data. There are three
principal reasons for using a log file:
■ To guard against losing information entered since the last backup
When the entire log file is integrated into the last backup, the database
is placed in the exact state that it was in just before the incident.
■ To undo an error (for example, the accidental erasure of a record)
To undo an error, you can restore the last backup and integrate the log
file up to the operation preceding the error.

4D Backup Reference Manual 57


Chapter 4 Using a Log File

■ To update a mirror database on the network.


For information on this use of the log file, refer to the next chapter,
“Using a Logical Mirror.”

Managing The Log File


This section contains information about creating and maintaining the
log file.

Creating the Log File If you want to record the changes to your database in a log file, you
must create a log file from within 4th Dimension or 4D Server. By
default, 4th Dimension works without creating a log file.

Note To determine whether or not your database is working with a log file,
check for the No Log File menu item in the User environment’s File
menu. This presence of this menu item indicates that a log file is
working.

Database working without a log file Database working with a log file

In addition, with 4D Server, the name of the log file is displayed in


4D Server’s main window on the server machine.

Log file

58 4D Backup Reference Manual


Managing The Log File

❿ To create a log file:


1 Create a full backup of your database.
To reconstruct a database, you must have a full backup in which you
can integrate the log file operations.
For this reason, if you try to create a log file without first creating a full
backup, or if you have modified the data in the database since the last
backup, the application displays the following alert box:

Once your database has been backed up, you can generate the log file.
2 Choose Log File from the File menu.

4th Dimension 4D Server


(User environment) (Server machine)

An Open File dialog box appears.

4D Backup Reference Manual 59


Chapter 4 Using a Log File

Macintosh Windows

3 Click the New button.


A standard Save File dialog box appears, allowing you to choose a
name and location for your log file.

Macintosh Windows

By default, 4th Dimension gives the log file the same name as the data
file, plus the extension “.4DL” on Windows (“DataFile.4DL”) and the
suffix “.log” on MacOS (“Data File.log”). You can keep this name or
choose another one.
If possible, you should place the log file on a disk other than the one
on which your database is located. This ensures that you will be able to
use the log file even if you are having problems with your hard disk.
4 Click the Save button to save the log file.
The log file begins recording all subsequent data operations. The log
file remains active throughout each user session, becoming active
again each time the user launches the database.

60 4D Backup Reference Manual


Managing The Log File

Note A database can work with only one current log file.

Closing the Log File You can close the current log file at any time. Closing the log file causes
it to stop recording changes to your data.

To close the current log file, choose No Log File from the File menu of
4th Dimension or 4D Server.

Warning About Closing Because it stops recording changes, the log file that you have closed
the Log File will become invalid if you continue to make changes to your data. For
this reason, you may not want users to be able to close the log file. To
prevent users from doing so, you can make the log file mandatory (see
the next section, “Making the Log File Mandatory”).

To close the current log file because it has become too large, make a
backup of the log file instead. When you backup a log file,
4th Dimension or 4D Server creates a copy of the log file and starts a
new, empty log file.

Making the Log File It is possible to make the log file mandatory for your database in order
Mandatory to avoid any rupture in the continuity of the log file. This option can
be accessed from the 4th Dimension or 4D Client Properties dialog box.

❿ To make the log file mandatory:


1 Choose Properties from the 4th Dimension or 4D Client File menu in
the Design environment.
The Properties dialog box appears.
2 Check the Mandatory Log File check box.

Mandatory log file


check box

4D Backup Reference Manual 61


Chapter 4 Using a Log File

3 Click OK.
You can no longer use the database without a log file. 4th Dimension
will not allow you to close the log file or open the database without a
current log file.

Creating a Backup of Your database backup system should include the backup of log files.
the Log File With the 4D Backup plug-in, you can back up the log file with or
without the structure file. Creating backups of your log files serves two
important functions:
■ It guards against the log file growing too large. With each backup of
the log file, 4th Dimension or 4D Server closes the current log file,
creates a backup and starts a new, empty log file. The old log file is first
archived and then deleted.
■ Regular backups let you integrate operations into previous backups,
regardless of the time that has elapsed since the backup and log file
were created. In other words, 4D Backup allows you to restore a
database to its state at any point in time.

The backup of the log file takes place at the same time as the full
backup. You can specify the log file backup as one of your backup
parameters by clicking the Log File check box in the Full Backup
window:

Log File check box

The other backup parameters—number of sets, location of the backup


files, and so on—also apply to the log file backup.

The log file backup is placed in the same directory as the full backup:

62 4D Backup Reference Manual


Managing The Log File

Naming the Log File On Macintosh


Backup (Backup with the 4D Backup creates the name of the log file backup as follows:
Database Files)
Log file name + [Starting backup # to ending backup #]

This name indicates the backup into which the log file can be
integrated. For example, the log file saved with the 24th backup of
“MyBase” will be called “MyBase.data.log[23 to 24]”. It contains the
operations performed between the 23rd and 24th backups. These
operations can be integrated into the 23rd backup.

If you do not systematically backup the log file with every backup of
the database files, the log file backup name reflects this situation. For
example: “Mybase.data.log[12 to 15]”.

On Windows
The log file backup includes a three-character suffix representing the
number of the backup, followed by the extension “.4BL”. File names
are limited to eight characters, so the log file name is reduced (by
suppression of vowels) if necessary. For example, the log file
“MyHistor.4DL”, saved with the 24th backup of the database, will be
named “Myhst024.4BL”. Note that the number “024” indicates that
the log file (containing the operations performed between the 23rd
and 24th backups) is saved with the 24th backup of the database. This
log file can be integrated into the 23rd backup.

The name of the log file backup has the same number as the full
backup, the same as if you backed it up systematically with the
database files. In this case, you can have the file “Myhst012.4BL”, then
the file “Myhst015.4BL”.

Naming the Log File If you save a log file between two full backups (for example, if your log
Backup (Backup file has become too big for the volume to accommodate it), it is named
between Database
Backups) (and numbered) in the following manner.

These archives will not be automatically deleted by 4D Backup;


therefore, it is your responsibility to delete them manually.

On Macintosh
The log file backup is named with two suffixes:

Log file name + [xxx to yyy] - nnn

4D Backup Reference Manual 63


Chapter 4 Using a Log File

where xxx and yyy are the full backup numbers between which the log
file is included, and nnn is a letter that specifies the rank of the log file
among the different log file backups (done between database backups).
For example, if you do three backups of the log file between the 24th
and 25th full backups, they will be successively named:
“MyBase.data.log[24 to 25] - a”, “MyBase.data.log[24 to 25] - b” and
“MyBase.data.log[24 to 25] - c”.

You must then integrate them in this order to be able to rebuild the
operations done between the 24th and 25th full backups.

On Windows
The log file backup includes a three-character suffix representing the
number of the backup, a letter that specifies the rank of the log file
among the different log file backups (done between database backups),
followed by the extension “.4BL”. For example, the log file
“MyHistor.4DL”, backed up for the second time after the 24th full
backup, is named “MyHistor024-b.4BL”.

For Mirror Backups You cannot create a backup of the log file in a mirror backup system.
However, creating such a backup is unnecessary because:
■ The log file is automatically backed up on the mirror machine.

■ A new log file is automatically started when the old one is sent to
update the mirror database.

If you attempt to back up the log file while using a mirror backup
system, the following alert appears:

If you are using a logical mirror, do not create a backup of the log file
on the database machine. Such a backup would cause a discontinuity
in the operation of the log file that would hinder the next update of
the mirror.

If you are using a logical mirror, back up only the data and structure
files. The log file will be sent to the mirror and archived on the mirror
database.

64 4D Backup Reference Manual


Integrating The Log File

Restoring the Log To restore a log file, you need to have both the log file and the database
File on the same machine. Only 4D Backup, 4D Server, and 4D applications
can perform this operation.

❿ To restore a log file backup:


1 Click the Restore button in 4D Backup’s main window
OR
Choose Restore in the File menu.
A standard open-file dialog box appears.
2 In Windows, choose the Log File Backup file type.

Menu to choose the


type of backup file
to restore

3 Choose the archived log file.


4 On the Macintosh, click Open.
In Windows, click OK.
The log file is immediately extracted from the backup. A Save File
dialog box appears, indicating the name and location of the restored
file.

Integrating The Log File


Integrating a log file into a database allows you to re-execute the data
operations listed in the log file.

For example, suppose that you back up the database, then add two new
records, and then an accident occurs, rendering the database unusable.

The following alert boxes will appear when you open the database after
the accident:

4D Backup Reference Manual 65


Chapter 4 Using a Log File

In this case, you can restore the previous database backup and then use
the current log file to add the two records again.

If you modify the structure of a database while a log file is in progress,


you will need a current structure in order to incorporate the log file.

You can integrate a log file from either of the following locations:
■ 4D Backup as an independent application. With 4D Backup, you
choose the database with which to work and then the log file to
integrate.
■ Your 4th Dimension or 4D Server database (using 4D Backup’s
Restore Log plug-in). This option allows an interactive integration in
which you can view changes as they occur.

Note If you use a startup method that performs modifications on data, the
Restore plug-in won’t be able to integrate a Log file in the 4D
environment (except 4D Server if no users try to connect). The log file
to integrate won’t correspond with the data from a previous restore.
You need to use the 4D Backup stand-alone application to integrate the
log file.

The illustration on the following page explains how to quickly recover


your database after an accident, by restoring the last backup and
integrating the log file.

Recovery of the The diagram on the following page dramatically illustrates the process
Backup and of restoring a database after data has been corrupted or lost.
Integration of the
Log After Accident

66 4D Backup Reference Manual


Integrating The Log File

1. Complete backup

MacOS file names


Windows file names
Base Base.data Base.data.log Base[25] Base.data.log[24 to25]
Base.4DB Base.4DD Base.4DL Base025.4BK Base025.4BL

2. Using the database

Base Base.data Base.data.log


Base.4DB Base.4DD Base.4DL

3. Accident

Log file, saved on


another disk, is not
Base Base.data Base.data.log affected
Base.4DB Base.4DD Base.4DL

4. Restoration of the previous full backup with 4D Backup application

Base.data Base[25]
Base
Base.4DB Base.4DD Base025.4BK

5. Integration of the current log file into the restored database with either the
application or plug-in

Base Base.data Base.data.log


Base.4DB Base.4DD Base.4DL

6. User can begin using the database again

Base Base.data Base.data.log


Base.4DB Base.4DD Base.4DL

4D Backup Reference Manual 67


Chapter 4 Using a Log File

Integrating the Log If you integrate the log file from your database, you can immediately
File Interactively view the effects of the integration on your data. Such interactive
integrations can be particularly advantageous for correcting a user error
or for analyzing a problematic sequence of operations.

Correcting User Errors Suppose that a user error has occurred (for example, the accidental
erasure of a record). You want to integrate the operations up to the
point just before the error, without losing the operations that have
taken place after the error. To do this, you can:
■ Integrate the first part of the log file (up to the erasure)
■ Export the desired data from 4th Dimension

■ Integrate the rest of the log file


■ Import the previously exported data into the database
The erased record is recovered.

Analyzing the Sequence You can use the log file to analyze situations in which the
of Operations chronological sequence of operations is important. This is particularly
helpful for debugging databases involving multiple users or processes.

Using the Restore The way that you get to the Restore Log window for use in the
Log Window integration process differs depending on how you are using
4D Backup.

As an Independent To use 4D Backup as an independent application:


Application
1 Click the Restore Log button in 4D Backup’s main window.

4D Backup displays a standard Open File dialog box.


2 Select the structure of the database in which the log file is going to be
integrated.
The Restore Log window appears.

68 4D Backup Reference Manual


Integrating The Log File

Using the Restore Log To use the plug-in you first must have installed it in your database. For
Plug-in more information, see the 4D Backup Installation Guide.

❿ To restore the log file within 4th Dimension:


1 Using 4th Dimension or 4D Server, open the database in which you
want to integrate the log file.
2 From the User environment, choose Restore Log from the Plug-ins
menu.
The Restore Log window appears1.

If you are using 4D Server, this window appears on the server machine.

Opening a Restored When you first open a restored database with 4th Dimension or
Database 4D Server, you may be asked to locate the current log file.

In this case, you need to specify the log file that should be used to
record any subsequent data operations. Remember that if you are
going to integrate a log file, you should not perform any data
operations at this time.

When asked to locate the current log file, you can do one of the
following:
■ Work without a current log file until you have integrated the previous
log file operations
To do so, click Cancel. When the entire log file has been integrated, 4D
Backup allows you to make it the current log file. Note that this option
is invalid if you selected the Mandatory Log File check box in the
Preferences dialog box. In this case, you must create a new log file.
■ Create a new current log file
Use this option if you selected the Mandatory Log File check box in the
Preferences dialog box. To create a new!
log file, click the New button.
Since you will not need this file once the previous log file has been
integrated, you can give the file a name such as “temporary”. Once the

1. It appears automatically if you are using 4D Server. If needed, you can


close the window to free up memory.

4D Backup Reference Manual 69


Chapter 4 Using a Log File

previous log file has been entirely integrated, 4D Backup will ask you if
you want to make it the current log file. If you click the Yes button, the
temporary log file is closed and the one that you just integrated
becomes the current log file. You can delete the temporary file.
■ Open the log file that was current before the backup
If you do not want to integrate the log file (you want only to restore
the database to the point of the last backup), select the log file and
click the Open button (Macintosh) or OK (Windows). If this file was
backed up at the same time as the database, you should have already
restored it.

Choosing the Log Regardless of whether you are integrating the log file from 4D Backup
File to Integrate or from the Restore Log plug-in in 4th Dimension or 4D Server, you
choose the log file to be integrated in the same way.

❿ To choose the log file to integrate:


1 In the Restore Log window, click the Open Log button.
A standard Open File dialog box appears.
2 Select your log file and then click the Open button.
4D Backup can open a log file backup as well as the original log file
generated by 4th Dimension.

Log file Backup of log file

A progress indicator is displayed while 4D Backup analyzes the


contents of the log file.
After this operation has finished, information concerning the log file is
displayed in the Restore Log window.

70 4D Backup Reference Manual


Integrating The Log File

Note If 4D Backup finds that the log file is incompatible with the database’s
data file, it displays an alert message indicating that the integration is
impossible. See Appendix B for a listing of error messages.

Viewing the Log File The Restore Log window allows you to view the operations listed in the
Operations log file by clicking the open triangle,

or by choosing Show List from the File menu.

If you are using the Restore Log plug-in, the File menu is located in the
Restore Log window.

Note This menu item becomes Hide List once the list is shown.

The window enlarges to show the database operations. By default, the


last operation is selected.

Symbol of
operation type

Operation type

If you click the Integrate button, all the operations in the log file will
be integrated into the database. Operations that have been integrated
into the database appear dimmed.

The integration of operations can be done only in strict chronological


order. In this way, you ensure that all of the operations will take place
in their original order (avoiding any data inconsistency problems) and
that no operation will be performed more than once or omitted.

4D Backup Reference Manual 71


Chapter 4 Using a Log File

Interpreting the The log file provides information about each operation to help you
Contents of the Log follow the sequence of operations and decide which operations to
File Listing integrate.

For example, if a user accidently deletes a record, you can isolate that
operation in the log file by viewing the deletions that have taken place.
You can also use other methods; for instance, if you know the
approximate time of the deletion, you can perform a search based on
that time. For more information, see “Searching for an Operation”
later in this chapter.

The log file can contain the following columns.


■ Operation: This column contains the type of operation performed
(addition, modification, deletion, or transaction), along with an icon
allowing you to quickly identify the operation type. The icons are:

Addition of a record
Modification of a record
Deletion of a record
Transaction (a transaction can be validated or cancelled)

■ Table and Record: For additions, deletions and modifications, this


column provides the name of the table and the record number. For
transactions, 4D Backup displays the number of additions, deletions
and modifications that occurred in the transaction.

If the transaction is cancelled, the line is displayed as follows:

■ Content: This column can display the contents of fields that you have
selected. For information on how to select the fields, refer to the next
section, “Selecting the Fields to be Shown.” The Content column is
displayed only if you have selected one or more fields for which you
want to view the contents.
■ User: In a multi-user database, this column displays the name of the
user that performed the operation.
■ Date: This column displays the date of the operation.
■ Time: This column displays the time of the operation.

72 4D Backup Reference Manual


Integrating The Log File

Selecting the Fields If the operation is an addition or modification, you can view the
to be Shown contents of one or more fields of the record involved in the operation.
You can select the fields to be shown on a table-by-table basis. For
example, in an [Employees] table, you may find it useful to display the
employee’s first and last names.

❿ To select the fields to include for each table:


1 Choose Show Fields from the File menu.
The Field Selection dialog box appears.

2 Click the table name and then click one or more fields that you want
to display in the list of operations.
The digit that appears next to the field corresponds to the order in
which the fields will be displayed.

To deselect a field, click it again. You can display up to four fields per
table.
3 Click OK.

Note You cannot view fields of type Blob, Picture, or Subfile.

4D Backup Reference Manual 73


Chapter 4 Using a Log File

After these parameters are established, 4D Backup displays, for each


addition or modification, the value of the fields chosen for the table.
For modifications, 4D Backup displays the new value of the record.

Contents of first and last


name fields

Note 4D Backup does not display information for deletions.

Searching for an The log file records the date and the time at which each operation
Operation occurred. You can search for an operation that occurred on or around a
specific date and time.

4D Backup executes searches only when the list of operations is shown


(when Show List has been chosen from the File menu).

❿ To perform a search based on the date and time of the operation:


1 Choose Find from the File menu:
The following dialog box appears:

By default, the date and the time displayed correspond to the


operation selected in the window.
2 Click in the corresponding areas to enter the date (month/day/year)
and the time (hour:minute:second).
3 Click the Find button.
The search selects the operation nearest to the specified date and time.

74 4D Backup Reference Manual


Integrating The Log File

Note If the machine from which the operation was performed did not have
the correct date and time in its system, this search will not work.
However, the order of operations displayed in the Restore Log window
is still accurate, because 4D Backup determines this chronology based
on an internal counter.

Integrating To select an operation:


Operations
1 Click the line describing the operation.
The line appears highlighted.

All preceding operations will be integrated when you click the


Integrate button.

Note To maintain the logical coherence of your data, you cannot integrate
operations in any order that you want. You can select a specific
operation, but all operations before it will also be integrated.

2 Click the Integrate button to execute the selected operations.


A meter displays the progress of the integration.
The operations integrated into the database now appear dimmed. You
cannot re-integrate operations that have already been integrated.

4D Backup Reference Manual 75


Chapter 4 Using a Log File

Integration of You cannot undo operations that you have integrated; once you
Permanently Modified integrate an operation, the data file is permanently modified. You can,
Data Files
however, restore a previous backup and log file and perform the
restoration again.

If you are working with the Restore Log plug-in in the background of
4th Dimension, you can click in a 4th Dimension window to view your
records and immediately analyze the results of the operation. Do not,
however, modify the database before the end of the integration.

Warning: If you are working with the integration plug-in, be sure not
to add, modify or delete data directly in 4th Dimension while you are
integrating the log file, because the log file will no longer be usable.

If your database adds, modifies or deletes records in the On Startup


Database method, you have several options:
■ The simplest option is to restore the log file from the 4D Backup
application.
■ Another option is to make a copy of your database structure without
this method. You can then use this structure to integrate the log file.
■ If you have not made a copy of the structure and you need to integrate
operations into the log file, you must interrupt the On Startup method
by holding down the Option key while launching the database. Doing
so places you in Trace mode, from which you can abort the On Startup
method. For information about Trace mode and the Debugger, refer to
the 4th Dimension documentation.

76 4D Backup Reference Manual


Integrating The Log File

Integrating Several If you have created several backups since the full backup that you want
Log Files to use, you must successively integrate your log files to bring the
database up-to-date.

❿ To integrate several log files:


1 Integrate the first log file in its entirety and then click the Close Log
button or choose Close from the File menu.
The button name changes to Open Log, allowing you to choose the
next log file.
2 Redo the same operations for each log file.
Remember to maintain the chronological order of the log files. For
example, on the Macintosh, “Base.data.log[4 to 5]” will be followed by
“Base.data.log[5 to 6]”; on Windows, “Base025.4BL” will be followed
by “Base026.4BL”.

Quitting the Log File When you have finished integrating the operations from the log file,
Integration close the Restore Log window, using one of the following methods.

From the 4D Backup To return to the main 4D Backup window:


Application
■ On the Macintosh, click the close box of the Restore Log window, or
choose Quit from the File menu.
■ In Windows, double-click the Control-menu box, or choose Close from
the Control menu.

From the Restore Log After the integration is finished, 4D Backup displays the following
Plug-in dialog box, asking if you want the log file to become the current log file
for the database:

If you click Yes, the log file that you just integrated becomes the
current log file for your database and begins to register the operations
that are performed.

If you click No, the integrated file will not be used.

4D Backup Reference Manual 77


Chapter 4 Using a Log File

❿ To quit the plug-in:


■ In 4th Dimension, choose Quit from the window’s File menu or click
the close box of the integration window (Macintosh) or double-click
the Control-menu box (Windows). You return to the 4th Dimension
windows.
■ In 4D Server, click the Close Log button or choose Close from the
window’s File menu. You can then click 4D Server’s main window to
bring it to the front of the screen.

Exporting the Log The Export option in the File menu of the Restore Log plug-in enables
File you to export the contents of the log file in a form that can be read by
other software, such as a spreadsheet, a word processing application
and even 4th Dimension. You can also create a method in
4th Dimension to parse it.

❿ To export the log file:


■ Choose Export from the File menu.
The file selection dialog box appears, allowing you to specify the
filename that you wish to generate (by default, the name proposed is
the name of the log file followed by “.txt”).

After you have validated the dialog box, the data is exported. A meter
indicates the progress of the operation.

The format of the exported file is as follows:


Operation, File number, Record number, Process number, User, Date, Time, Fields 1 to 4

Columns are delimited by tabs and rows are delimited by carriage


returns.

You cannot Blob, Subfile, or Picture fields.

78 4D Backup Reference Manual


5 Using a Logical Mirror

A logical mirror consists of an exact copy of a database that is


maintained and kept current on another machine in order to provide
greater data protection and minimize the down time associated with
any incident.

With a logical mirror, a replica of the original database is stored on


another machine and periodically updated over the network using the
log file. After each update, 4D Backup creates a backup of the mirror
database for increased protection.

If an incident occurs, the mirror database can be copied to the main


database machine. After the current log file is integrated, the database
is up-to-date and ready for immediate use.

Because of the reliability and minimal down time associated this


method, you should consider it for all critical databases.

It is important to remember that you must set up a system for updating


the mirror database. You can update the mirror database using menu
items in the User environment, or you can automate updates using the
4D Backup procedural language or the backup scheduler. It is up to you
to decide when and how often the mirror database is updated.

4D Backup Reference Manual 79


Chapter 5 Using a Logical Mirror

Setting Up The Mirror


Before you can use a mirror backup system, you must ensure that you
have the right hardware and software configuration. You must have:
■ A database machine

■ A mirror machine

■ A network connecting the two machines

The Database The database machine is the machine that contains the original
Machine database—that is, the database currently in use. The original database
must have the 4D Backup plug-in installed.

Note If you make a copy of the original database, you will need to quit and
re-launch the database. A this point, if a method that modifies the data
is executed at startup, the original and the mirror database won’t be
identical. In this case, do a full backup using the 4D Backup plug-in,
copy the backup to the mirror machine and restore it.

The database must also have a current log file. To verify that you have
a current log file, go to your original database and check that the
No Log File menu item is displayed in the User environment’s File
menu. If you do not have a current log file, create a complete backup
of the original database and then choose Log File from the File menu
to generate a log file.

In order to use the mirror backup method, you must open the database
on the database machine using 4th Dimension or 4D Server.

The Mirror Machine The mirror machine is the machine that will store the replica of the
original database. To replicate the original database, you must copy it
from the database machine to the mirror machine. Note that you need
only replicate the original database once, when you first set up the
mirror backup system.

In order to use the mirror backup method, you must open the mirror
database on the mirror machine using 4D Backup.

The Network The two machines, database and mirror, must be connected to each
other by a network.

80 4D Backup Reference Manual


Setting Up The Mirror

All combinations of platforms are possible, as long as you are using the
proper versions of the software. The following table lists the
combinations:

Database Machine Mirror Machine


4D/4D Server MacOS 4D Backup MacOS
Macintosh
+ 4D Backup MacOS
4D/4D Server Windows 4D Backup Windows
Windows
+ 4D Backup Windows

The mirror machine must have enough available memory to execute


4D Backup, and a hard disk capable of storing the information from
the database. Each machine is provided with an identical copy of the
structure and data files.

The Backup plug-in (“Backup.4DX”) must be installed in a Mac4DX or


Win4DX folder located at the same level as the operating database,
because a mirror update can only be accomplished from the 4D Backup
plug-in. Furthermore, the same network protocols and components
must be installed on each machine. For more information about
installing 4D Backup in your 4th Dimension environment, see the
Installation Guide.

Remember, the operating database must work with a log file, because it
is this file that updates the mirror database.

If Your Data File is You can divide a data file into segments that reside on different hard
Divided into disks. If your data file is segmented, the database machine and the
Multiple Segments mirror machine must be identically configured. They must have the
same number of disks and the same storage capacity for each disk.

Note A mirror backup does not implement segmentation. This only affects
databases that use segmented data files of greater than 2 GB.

If the Structure of 4D Backup automatically updates the mirror database with any
Your Database changes to your data. It does not handle updates to the database
Changes structure.

To use a mirroring system, the original database and mirror database


must have the same structure. If you modify the structure of the
database, you must add the new structure to both databases at the
same time.

4D Backup Reference Manual 81


Chapter 5 Using a Logical Mirror

Note If your database is currently under development (in other words,


structural changes are frequent), you should opt for complete backups
instead of using a mirroring system.

Optimizing a Logical The mirror is a sophisticated tool for ensuring the safety of your data;
Mirror so you should carefully prepare its environment. The mirror machine
should be in good working condition, equipped with a reliable hard
disk freshly formatted with a faulty-sector-checker. The operating
system should be fully compatible with the machine’s capacities, with
no unnecessary extensions or utilities. All these elements contribute to
a good start.

Location Set up the machine in a safe location, away from dust and temperature
changes (for example, avoid having it stand in the sun), far from
passageways and sheltered from undesirable tinkering. If security is a
stringent requirement, you may consider operating the mirror
machine in a steel plated, fireproof cabinet that is located in your
bunker or fallout shelter.

Network To ensure that the history file can be sent to the mirror database, the
machines, of course, must be connected by a network, such as
Ethernet.

Network speed has little effect on regular updates of the database, as


the volume of transmitted (update) data is low (generally a few Kb,
depending on saving patterns and database activity).

On the other hand, network performance is important in case of


trouble, requiring the downloading of the entire mirror database to the
database machine (several Mb, depending on database size).

Note For more information on security, see Chapter 2, “Backup Strategies.”

Setting The Parameters


Prior to using the mirroring system, you must indicate how you want
the mirror backup to proceed.

Preparing the First, make sure that identical copies of your database (structure and
Database data files) are present on the database station and on the mirror
machine.

82 4D Backup Reference Manual


Setting The Parameters

If you want to install the mirror on a platform different from that of


the database machine, you must use 4D Transporter together with the
structure and data files of your original database.

Note The 4D Transporter utility enables you to adjust the internal structure
of your 4D files from one platform to another. This program is
provided with 4th Dimension and 4D Server.

Make sure that the Backup plug-in is installed as described page 81. If
you are working in Windows or in a non-homogenous environment,
make sure that the network components required for proper operation
of the logical mirror are installed and adequately configured. For more
related information, see the Installation Guide.

Note There is no need to download the 4D extensions listed in the Win4DX


or Mac4DX directories from the database machine to the mirror
machine, because the design of the logical mirror does not require it.
However, the availability of these extensions on the mirror machine
could speed up database restart operations in case of trouble.

Then, launch your database with 4th Dimension or 4D Server on the


database machine. Make sure you are working with a log file; in User
mode, the command No Log File in the File menu must be enabled. If
this is not the case, perform a full backup, then select the command
History File in the File menu to create your history file. For more
relevant information, see Chapter 4, “Using a Log File.”

Setting Parameters To set a number of parameters for the mirror backup on the mirror
on the Mirror machine.
Machine
1 Launch the 4D Backup application on the mirror machine.
2 Click the Mirror button in the main window:

A standard open-file dialog box appears.


3 Select the copy of your database.
On the Macintosh, click Open.
In Windows, click OK.
The Mirror window appears.

4D Backup Reference Manual 83


Chapter 5 Using a Logical Mirror

The Mirror Window This window provides information on the database and on the
volumes connected to the mirror machine.

The Mirror window contains the following features:


■ Destination Volume area: Displays the volumes connected to the
mirror machine. These volumes include hard disks, magneto-optical
drives and other volumes, but do not include floppy disk drives. You
use this zone to specify the volume that will store the complete
backups of the data from the mirror database.
■ Mirror Database area: Displays the names of the database files, the
date and time of the last update and the size of the log file used for the
update.
■ Destination Volume Information area: Displays information about the
selected backup volume.
■ Stop Mirror button: Allows you to stop the publication of the mirror
database on the network. Note that this means that the mirror
database will no longer be updated. If you click this button, 4D Backup
returns you to its main window.

Destination Volume After each log file update, 4D Backup automatically creates a backup of
the log file and the data in the mirror database. To define the volume
on which these backups should be saved, click the icon of the volume
in the Destination Volume area.

4D Backup places the backups in a directory (folder) at the top level of


the selected volume.

On the Macintosh, the folder is named “Database Name•”.

In Windows, the directory is named “Databasename.MIR”.

84 4D Backup Reference Manual


Setting The Parameters

Backups of the mirror database are triggered from the database


machine. This is explained in the following sections.

Conserving or Deleting You can choose to delete the oldest backup of the mirror database in
the Oldest Archive order to free space on the backup volume. This option turns is useful if
you wish to backup a mirror database on a volume that does not have
the necessary space to accommodate both the older mirror backup and
the mirror backup in process.

You do so in the Preferences dialog box of the mirror window. To


display this dialog box, choose Preferences from the File menu of the
mirror window. The Preferences dialog box appears.

Delete the oldest backup option

These options are disabled on


the mirror machine

Choose the Delete oldest archive before creating a new one option.
This option allows you to delete the oldest backup on the selected
volume before a new backup is created.

If you select this option, the display of the available disk space takes
into account the space that will be freed by deleting the old archive.

Mirror Projects As with complete backups, you can save the parameters you set on the
mirror machine in a project file. Saving your parameters in this file
allows you to reuse them at any time, without having to set the
parameters again.

If you create a project file from the mirror, 4D Backup saves the
following parameters:
■ The name of the mirror database
■ The volume that will store the backups of the log file and the data

■ The preferences for the backup

You can create, open, or save your projects using the Project menu.

4D Backup Reference Manual 85


Chapter 5 Using a Logical Mirror

By default, 4D Backup proposes that you name the project


“Mirror Project” (on Macintosh) or “Mirror.4BP” (on Windows). If you
keep this name and place the file in the same directory (folder) as the
mirror database, the project will automatically be used when you open
the Mirror window.

You can also double-click the project file to launch 4D Backup in


mirror mode and start the mirroring process.

Hot Tip To ensure that the mirror database is automatically launched when the
mirror machine is started, you can create and place an alias (MacOS), a
shortcut (Windows95) or a copy of this file in the system startup
directory (Startup Items folder in the Macintosh System Folder).

Setting Parameters Since the mirror backup process is initiated from the database machine
on the Database (i.e., the updates are periodically sent from the database in use), the
Machine parameters for the sending of the log file are specified on the database
machine.

Setting Parameters for To set the parameters for the update, choose Update Mirror from the
the Update Plug-ins menu of 4th Dimension or 4D Client, or from 4D Server’s
Backup menu.

The Update Mirror window appears.

86 4D Backup Reference Manual


Setting The Parameters

This dialog box is subdivided into three areas:


■ Destination Volume area: Contains the list of mirrors in the upper
area.
■ Database to Backup area: Contains information about the database
and the backups on the lower left.
■ Mirror Server area: Contains information about the mirror machine
on the lower right.

The window also contains the Project menu.

Setting and Using The Project menu allows you to save your parameters for updating the
Projects mirror in a project.

You can also open an existing project to reuse its parameters. As with
the full backup, if you name the project “Backup Project” (on MacOS)
or “Backup.4BP” (on Windows) and place it in the same folder as the
database, 4D Backup will automatically use it whenever you update the
mirror database.

The project saves the following parameters:


■ The name of the mirror database and the network zone in which it is
located
■ The state of the Verify Backup option

Choosing the Network To choose the network component:


Component Containing
the Mirror
1 Double-click on the 4D Client application icon to open the database.
Depending on the network components you have installed and your
network configuration, you will see one of the following dialogs:

4D Backup Reference Manual 87


Chapter 5 Using a Logical Mirror

Network Protocols

Windows MacOS

TCP/IP
Click for
more
choices

IPX

88 4D Backup Reference Manual


Setting The Parameters

Network Protocols

Windows MacOS

ADSP
no zones

ADSP
multiple
zones

The Other button is available only when more than one network
component is installed.
2 To choose another network component, click the Other button, select
the network component that you want and click OK.

Specifying the The Destination Volume area displays the mirrors in the selected zone.
Destination Volume If the zone contains several mirrors, 4D Backup selects the mirror with
the same name as the database, by default.

4D Backup Reference Manual 89


Chapter 5 Using a Logical Mirror

Note Each database can have only one mirror because each log file update
can be sent only once, to one location.

Once you have selected a mirror database, you can verify that
communication has been established between the two machines. To
do this, go to the mirror machine and check that the connection icon
is displayed in the Mirror window.

Connection
icon

Verifying the Backup If you check the Verify Backup check box in the Update Mirror
window, 4D Backup verifies the log file update. This option decreases
the speed of the update and should be used only if your network tends
to be unreliable.

Specifying the Number After each log file update, 4D Backup creates backup copies of the log
of Sets of Mirror file and of the data file of the mirror database.
Backups
You must have previously specified, on the mirror machine, the
volume to receive the backups. Recall that 4D Backup puts these
backups at the first level of the selected volume, in a folder named
“DatabaseName•” on the Macintosh, or “DatabaseName.Mir” on
Windows.

The number of successive backups that will be saved on the mirror


machine is determined by the Number of Sets parameter. If you do not
want any backups to be automatically performed after each update, set
the Number of Sets to “None” by clicking the lower arrow.

We recommend, however, that you save at least one set of backups to


ensure the complete safety of your database.

90 4D Backup Reference Manual


Updating The Mirror Database

Updating The Mirror Database


This section explains how to launch the update of the mirror database
and describes the steps 4D Backup automatically follows when
updating the mirror database. This section also explains some of the
ways you can avoid or solve problems with transmission and
integration of the log file.

Launching the You launch the update of the mirror database from the Update Mirror
Update dialog box on the database machine. To update the mirror, click the
Send Log button.

You can also launch the update programmatically, using the


BK_Update mirror function.

4D Backup sends the log file and displays a dialog box with a progress
indicator indicating the progress of the update.

The Disk Usage indicator corresponds to the percentage of space used


on the mirror machine’s hard disk.

The Stop button allows you to interrupt the update at any moment.

Using the Backup You can automate the mirror update of a database opened with
Scheduler 4D Server, even if a client is not connected to it.
(4D Server only)
Before you set your automatic mirror updates, create a mirror project
manually by executing the first mirror update with 4D Backup’s
interface. Name your project “Backup Project” (on MacOS) or
“Backup.4BP” (on Windows), which is the default name of the project
used for the next automatic mirror update.

4D Backup Reference Manual 91


Chapter 5 Using a Logical Mirror

When you have installed 4D Backup plug-in in 4D Server, the following


window appears on the server machine:

The upper portion of the window enables you to program full backups;
the lower portion of the window enables you to program mirror
updates.

Frequency of Updates The check box activates or inactivates the automatic mirror update,
and the number and the pop-up menu allow you to manage their
frequency.

The next line has two functions:


■ It informs you of the next mirror update date and time

■ It informs you of an error if the preceding mirror update has not taken
place correctly
The time of the next mirror update is calculated according to the time
at which you define the settings. If you want to set the time of the mir-
ror update, just click the watch icon.

The following dialog box appears:

92 4D Backup Reference Manual


Updating The Mirror Database

The two entry areas allow you to enter the date and time of the first
mirror update. The next mirror update will take place at the specified
time and date, and the following mirror updates will take place at the
indicated interval.

If you check the “Display an alert box if the backup fails” check box,
the following alert box appears if the backup was not successful:

As long as the database administrator has not clicked the OK button in


this alert box, the backup scheduler will not start a new mirror update.

If you have a database that is permanently running, you might want to


check the “Backup only if the database is modified” check box. This
will prevent you from making multiple identical backups, such as over
a weekend when no modifications are being made.

The following diagram dramatically illustrates the updating of a mirror


from a client in use:

4D Backup Reference Manual 93


Chapter 5 Using a Logical Mirror

1. Current use

4D Client and 4D Server in use Mirror machine waiting

2. Updating of the mirror

or programmatic execution:
BK Update mirror

Log file

The usage is not interrupted Reception of the log file


(analysis, integration and
then complete backup)

Understanding the This section describes the steps 4D Backup takes when updating the
Update Process mirror database using the log file.

4D Backup Waits for When you launch the update of the mirror, 4D Backup first waits for
Operations to Finish all operations on the database to be terminated. All transactions must
be either validated or cancelled, and you cannot start any new
transactions.

If a transaction is blocked because the process that launched it is


frozen, 4th Dimension reactivates the process and freezes it again at the
end of the transaction.

94 4D Backup Reference Manual


Updating The Mirror Database

You should avoid presenting dialog boxes that must be validated in a


transaction. If you launch a mirror update while such a dialog box is
being displayed, the database will not be able to execute any new
transactions until the dialog box is validated.

You should not leave a transaction open unnecessarily; every


transaction should be closed by calling either VALIDATE TRANSACTION
or CANCEL TRANSACTION.

For information on transactions, refer to the 4th Dimension


documentation.

4D Backup Closes the To prepare for the sending of the log file, 4D Backup closes the current
Current Log File and log file and renames it by adding the suffix “.2” (on Macintosh) or
Starts a New Log File
“.4L2” (in Windows). For example, at this point, the log file could be
named “MyBase.data.log.2” (Macintosh) or “MyBase.4L2” (Windows).

4th Dimension then creates a new log file with the same name as the
original log file (for example, “MyBase.data.log). The new log file
becomes the current log file, which is used to record all subsequent
operations.

4D Backup renames the log file to be used for the update


(“MyBase.data.log.2” (Macintosh) or “MyBase.4L2 (Windows) into
“Log to Send” (Macintosh) or “Sending.4DL” (Windows).

4D Backup Sends the 4D Backup sends the previous log file using the network component
Log File previously chosen. 4D Backup sends the log file now called “Log to
Send” (Macintosh) or “Sending.4DL” (Windows) to the mirror. It will
then send the resulting file to the mirror. Do not destroy the “Log to
Send” or “Sending.4DL” file yourself—4D Backup deletes this file when
the backup has occurred correctly.

Note The presence of the “Log to Send” or “Sending.4DL” file indicates a


possible problem with your machine or network. You can consult the
Backup Journal to determine the percentage of updates that fail at the
first try.

4D Backup Integrates The integration of the log file in the mirror database is entirely
the Log File automatic. The log file received by the mirror is first stored in a
temporary file. When the reception is complete, 4D Backup analyzes
the file and immediately begins the integration of the log file into the
mirror database.

4D Backup Reference Manual 95


Chapter 5 Using a Logical Mirror

At each step, the log file is renamed. It successively takes the following
names:

Machine MacOS Windows


Database Base.data.log Base.4DL
machine
Base.data.log.2 Base.4L2
Log to Send Sending.4DL
S e n d t h e l o g fi l e
Mirror Log Receiving Receive.4DL
machine
Log Analyzing Analyze.4DL
Log Integrating Restore.4DL
Mirror Log Mirror.4DL
(at the moment of backup) (at the moment of backup)

If a problem occurs during the updating, for example an electrical


outage, the name of the log file present on the mirror machine
indicates the step at which the integration failed. When you first
launch the mirror database after the incident, 4D Backup displays a
message indicating the precise state of the update and the operations
to perform to complete the integration of the log file. Refer to
Appendix C, “Recovery Methods,” for more information.

The following diagram depicts the log file update process.

96 4D Backup Reference Manual


Updating The Mirror Database

Database machine Mirror machine


4D Server 4D Backup
or 4th Dimension in mirror
+ 4D Backup module mode

Network

Data Log Data

a Initial state of a Same database waiting


the database Histo.log for a connection
and creating a Histo.4DL
new, empty log

a Adding “b” a
b Building the +b Waiting
log file Histo.log
Histo.4DL

The backup is launched


Stopping the log
a file and changing a
+b Waiting
b the name Histo.log.2
Creating a new Histo.4L2
log file
Old file is sent on the network

a Adding “c” a
b The new file is +c +b +b
c added Histo.log Log Sending Log Receiving
Histo.4DL Sending.4DL Receive.4DL
Log Analyzing
Analyze.4DL

a Destruction of a Mirror integrates


b +c +b +b
Log Sending b the log file into the
c Sending.4DL Histo.log Log Sending Log Integrating
Histo.4DL Sending.4DL mirror database Restore.4DL
Backup of the
mirror database

... a Mirror is ready and


c Adding “d” +c b waiting for the next + b
d +d connection and the Mirror Log
Histo.log temporary log file is Mirror.4DL
Histo.4DL destroyed
The backup is working normally
... Adding “e” a Mirror is waiting
d +c b for the next
... +d
e connection
+e
Histo.log
Histo.4DL

4D Backup Reference Manual 97


Chapter 5 Using a Logical Mirror

4D Backup Creates a When the integration is finished, 4D Backup creates backups of the log
Backup of the Mirror file and the data. This occurs automatically as long as you did not
define the number of sets to be saved as “None”.
■ 4D Backup places the backup files in the “Database Name•” folder (on
Macintosh) and “Databasename.MIR” (on Windows), located at the
first level of the destination volume selected in the Mirror window. The
number of files saved correspond to the number of sets specified in the
Update Mirror window.
■ At the end of the backup, 4D Backup erases the temporary log file. The
mirror database is now ready to receive a new log file.

Recovering From An Incident


If an incident occurs that renders the original database unusable, you
can restore the database in just two steps:
1 Recopy the mirror database to the database machine.
2 Integrate the current log file into the database that you just copied.
This restores the operations performed between the last update and the
incident.
You can now use the database.

If the incident took place during the updating of the mirror, the mirror
database might be damaged. If this occurs, 4D Backup will alert you to
the problem when you restart the mirror database. If this happens,
refer to Appendix C for details on recovery methods.

98 4D Backup Reference Manual


A User Environment Errors

If any errors occur while you are using 4D Backup, the application
alerts you by displaying messages about the error, difficulty, or risk
encountered.

Each alert consists of three elements:


■ A label (the message)

■ An identification number

■ A commentary

Message label

Commentary

Identification number

All 4D Backup messages, as well as their ID number and commentary,


are provided on the following pages.

Summary of the 4D Backup Messages


The messages returned by 4D Backup can be divided into three groups:
■ Messages concerning backups—either full backups or mirror updates
(ID numbers after 101)
■ Messages concerning log file integrations (ID numbers after 201)

■ Messages that appear when the mirror is restarted and that concern the
preceding mirror update (ID numbers after 301)

4D Backup Reference 99
Appendix A User Environment Errors

Full Backup/Mirror
Update ID
Message Commentary
Number
101 The disk is probably damaged! Verify this media with a disk
recovery utility.
102 Initialization failed! Your floppy disk is damaged: try
another one.
103 Backup failed! You database has not been backed
up.
104 Backup completed successfully Backup has completed successfully.
105 Could not create file. This file may already exist or the
folder is locked.
106 Module is damaged! Check for viruses and reinstall the
backup module.
107 To keep the mirror database Otherwise you will have to make a
updated, you MUST send the full backup before using the mirror
log file to it. feature again.
108 Backup aborted. The backup process has stopped.
Some data may not have been
saved.
109 Invalid license number. The backup module CANNOT be
used on this server!
110 The network connection has A mirror database may already exist
failed! on the network.
111 Warning! This disk also contains You should not store the database
the database (or a data and its backup copy on the same
segment). disk. You may lose both!
112 This is one of the database’s You cannot enclose the data file or
files. structure file of the database you
want to back up.
113 This version of 4D is too old. The minimum version of 4D
required by 4D Backup is 3.1.
114 The file “4D Prefs” could not be This file is necessary for
opened. serialization. Check for its
availability.
115 This project file can’t be used. It doesn’t match this database, or it
has been damaged.
116 Preceding backup of log file An old “Log to send” or
failed. “Sending.4DL” file already exists.
Make sure that you have every log
file since the last full backup.

100 4D Backup Reference


Summary of the 4D Backup Messages

ID
Message Commentary
Number
117 Backup cannot be launched. Make sure that installation was
done properly, and that no backup
is currently in progress on another
4D Client or 4D Server.
118 Log file can’t be opened. Make sure that you have a valid log
file and make a full backup of your
database.
119 Can’t open the enclosure: This file may be in use. You should
back it up later.
120 Can’t initialize disk: Some files might be in use on this
disk, or file sharing is active.
121 Backup can’t execute correctly. Quit 4D, then verify the disks and
your network.
122 Could not receive the log file. Check the network and reinstall the
mirror.
123 Mirror does not match. Mirror database is not up to date,
or it is another database.
124 Insufficient disk space on the Free some space on the selected
Mirror machine. mirror disk so it can receive the log
and update the database.
125 Insufficient disk space, and this Not enough disk space available,
disk can’t be ejected. and disk can’t be ejected because
files are in use or being shared.
126 Sorting resources from 4D and Mirror update can’t be done.
4D Backup are not matching. Use Customizer Plus to solve this
problem.
127 No log file. Make a full backup and create a log
file.
128 Mirror database cannot be Free some space on the selected
duplicated. disk, or change the number of
backup sets required.
129 This is not the previously You must select the icon of the disk
selected volume. where you wish to back up your
database.
130 4D Backup is not installed in Verify that the Mac4DX or WIN4DX
4D Server. folders contain the 4D Backup
module. Use the installer from the
stand alone application 4D Backup
to install the backup module in
4D Server.

4D Backup Reference 101


Appendix A User Environment Errors

ID
Message Commentary
Number
131 This mirror isn’t available. Preceding mirror update may not
have completed, or a problem
occurred. Try again later.
132 The selected disk on the mirror Make sure that an appropriate
machine is incorrect. volume is selected for the backup
of the mirror database.

Log File Integration


ID
Message Commentary
Number
201 The file is damaged. The disk containing this file is
damaged. Your backup copy
cannot be restored.
202 The log file is not valid. The operations listed in the log
file are not correct. They cannot
be restored.
203 The log file and data file do not You should use the backup of this
correspond to each other. database that matches this log
file.
204 There are older log files that The database you opened is older
should be restored first. than the log file. Some operations
are missing.
205 This log file is too old. The database you opened already
contains all the operations
contained in the log file.
206 Some operations are missing at The log file does not correspond
the beginning of the log file. to this data file.
207 A disk error occurred when The log file is either damaged,
opening the log file. locked, or opened by another
application.
208 A disk error occurred when The file is either damaged,
opening file: filename locked, or opened by another
application.
209 An error occurred when creating The folder is locked or this name
file: filename already exists.
210 Number of errors recovered: Warning! The backup file was
number damaged. It has been recovered
by 4D Backup.
211 This version of 4D is too old. The minimum version of 4D
required by 4D Backup is 3.1
212 This date is earlier than the date The operations you're looking for
of the beginning of the log. may be in a previous log file.

102 4D Backup Reference


Summary of the 4D Backup Messages

ID
Message Commentary
Number
213 This date is older than the end of The operations you're looking for
the log. may be in another log file.
214 Log file cannot be integrated Operations external to the log file
anymore. have been done.
215 Not enough memory. 4D Backup Quit the application and allocate
needs: amount more memory with the Finder™.
216 Warning: This log file has a Its content doesn't match its
problem. header.
217 Wrong disk. Check that it matches the set and
disk # required.
218 Insufficient disk space. Free some space or save
documents on another volume.
219 Last operations may be lost. Because of an error that occurred
while using the database, the end
of the log file couldn't be written
completely.
220 Log restoration had to be You may try to continue the
aborted after operation: restoration after allocating more
memory, or freeing some disk
space.
221 Log file is open and is in use. You cannot proceed with the
integration of the log file. This log
file is open and is in use by
4th Dimension.
222 The disk is probably damaged! Check your disk using a disk tools
utility.
223 The end of the log file shows These transactions will not be
incomplete transactions. integrated with the log
224 An error occured during log Refer to the 4D
integration: documentation(*).

(*) The error 224 is usually followed by an error with an ID higher or


equal to 9000:
■ If the error ID is > 9000, please refer to 4D’s documentation.

■ If the error ID = 9000, it means that the 4D kernell failed to create,


modify or delete a record. In this case, 4D Backup aborts the log
integration and returns the error 224.

The possible causes of this error are:


■ the database is damaged. You should then check, using 4D Tools,
the structure and data files.

4D Backup Reference 103


Appendix A User Environment Errors

■ the structure and/or the data files used for the log integration are
different from the one used to create the log file. You should then
make sure that you are using the same versions.
■ the log file is damaged.

Restarting the
Mirror ID
Message Commentary
Number
301 Preceding mirror did not finish This log is most likely damaged,
normally. There is a file: filename but you may find the original with
the database currently in use.
It is better to reinstall the mirror.
302 Preceding mirror did not finish You may try to restore this log file
normally. There is a file: filename with 4D Backup before you restart
the mirror.
303 Preceding mirror did not finish The mirror database is most likely
normally. There is a file: filename damaged. Reinstall the mirror
from the database currently in use.
304 Preceding mirror did not finish This log file couldn't be backed up
normally. There is a file: filename properly, but the mirror database
may still be used. Remove or copy
this log elsewhere.
305 Preceding mirror did not finish This log file is damaged or doesn't
normally. There is a file: filename match this database. It is better to
reinstall the mirror.
306 This database may be Check that no operation is missing
incomplete. There is a file: in the database currently in use.
filename This log may contain some
operations that are not registered
in the database.

104 4D Backup Reference


B Rapid Recovery Methods

This appendix summarizes the operations to perform to recover your


database after an incident. The steps that you take depend on the type
of incident and your backup method.

If Database Execution Stopped


A database can stop executing for several reasons, such as a sudden
power outage or system failure.

When such an incident occurs, the current state of 4th Dimension’s


data cache dictates your recovery operations. The data cache is a buffer
in memory that temporarily records data operations. When the cache
is full, the operations are written permanently to disk.

An incident can occur:


■ When the cache is empty (no modifications have occurred since the
last writing of the cache to disk),
■ While the cache contains modifications not yet written to disk,
■ During the writing of the cache to disk.
In all cases, you should launch your database with 4th Dimension or
4D Server and determine the state of the data cache at the time of the
incident. The symptoms corresponding to each case and the opera-
tions for recovery are described in the following paragraphs.

Note For more information on the data cache, refer to the 4th Dimension
documentation.

4D Backup Reference 105


Appendix B Rapid Recovery Methods

Recovery Recovery procedures depend on the state of the data cache:


Procedures
Cache State Symptoms Database Recovery Procedures
Cache empty None; the database opens normally. All modifications to the database have
been saved. In this case, you do not
need to perform any recovery
operations.
Cache The last operations performed on 1. Integrate the current log file into
contained the database are missing. If your the database to restore the
operations database was working with a log missing operations.
file, when the database is opened, If you were working without a log
4th Dimension displays the file, the operations performed after
messages: “The log file contains the last writing of the cache to disk
more data than what has been are lost.
saved in the database” and “You 2. Launch your database with
should try to restore your log file 4th Dimension.
from your last backup if you want to
get back your data.”
Cache was You cannot open the database with Use the last backup of your database.
being written 4th Dimension. The application 1. Restore your last complete
to disk displays an alert box indicating backup, OR
problems with the data file. In the case of a mirror backup,
copy the mirror database from
the mirror machine to the
original database machine.
2. If your database was working
with a log file, integrate the
current log file into this database
to recover all data operations

If a Database File Was Lost


The loss of one or more database files can occur for several reasons,
such as defective disk sectors, a virus, or even accidental erasure.

If the problem is technical, start by finding and eliminating the prob-


lem. For example, you could use a disk utility to detect bad disk blocks
or viruses.

The recovery operations differ according to your backup method—wit


or without log files or logical mirrors.

106 4D Backup Reference


If an Incident Occurs During the Mirror Update

Recovery With This section provides the steps for recovering the database files from a
Complete Backups complete backup.
1 Restore the lost file(s), using the last complete backup of your
database.
When a segmented data file is damaged, you must restore all the
segments (even if only one segment was lost).
If the data file was lost and restored, 4th Dimension may display the
following message when you open the database:

2 In this case, integrate the current log file into the database that you
just restored.

Note If, since the last complete backup, you have created backups of only
the log file (without the data file), you must integrate the different log
file backups in the order in which they were created (denoted by the
suffixes “.a”, “.b”, and so on).

Recovery With a To recover database files using a mirror:


Logical Mirror
1 Copy the file from the mirror machine to the original database
machine.
2 Integrate the current log file into the original database.

If an Incident Occurs During the Mirror Update


If you use a logical mirror for your backups, an incident could conceiv-
ably occur during the mirror update. The incident could be caused by a
power outage, a network malfunction, a defective disk sector, and so
on.

4D Backup Reference 107


Appendix B Rapid Recovery Methods

This type of incident, although rare, requires specific recovery steps.


The steps differ according to:
■ The states of the two databases (the original database and the mirror
database)
■ The phase of the update that was in progress at the time of the
incident.

States of the Before deciding on a recovery plan, you must determine whether or
Databases not the original database and mirror database are usable.

If the incident took place during the writing of the data cache to disk,
the original database will be damaged. Similarly, if the incident
occurred while the mirror database was integrating the log file, the
mirror database will be damaged.

To verify the states of your two databases, open them with


4th Dimension. 4th Dimension will alert you if a database cannot be
used.

If a file named “Log Integrating” (Macintosh) or “Restore.4DL”


(Windows) is located in the folder containing the mirror database,
you should consider the database to be damaged, even if it opens
correctly with 4th Dimension.

When determining the state of the databases, one of four situations can
occur:
■ The two databases are intact (but the intermediate log files were not
destroyed)
■ Only the original database is damaged

■ Only the mirror database is damaged


■ Both databases are damaged

State of the Log File The log file being integrated is renamed at each step of the mirror
Integration update process. The name of the log file indicates the stage at which the
log file integration was interrupted.

As a result, after an incident, a log file named “MyBase.log” (MacOS) or


“MYBASE.4DL” (Windows) can have one of the following names:

108 4D Backup Reference


If an Incident Occurs During the Mirror Update

■ On the machine containing the original database (in the folder or


directory containing the log file):

MacOS Windows
MyBase.log MYBASE.4DL
MyBase.log.2 MYBASE.4L2
Log to Send SENDING.4DL
■ On the mirror machine (in the folder “MyBase•” on MacOS and in the
directory “Mybase.MIR” in Windows):

MacOS Windows
Log Receiving RECEIVE.4DL
Log Analyzing ANALYZE.4L2
Log Integrating RESTORE.4DL
Mirror Log MIRROR.4DL

Situation 1.The Two In this case, the incident did not take place during the writing of the
Databases Are Intact data cache or the integration of the log file. The following table indi-
cates the steps to take according to the files that are present on each
machine.

However, the mirror update may have failed, and the presence of inter-
mediate log files may prevent restarting of the database. There are sev-
eral cases, depending on the state of the log file integration and the
files present on each machine.

First case

Files on the database machine Files on the mirror machine


MacOS Windows MacOS Windows
MyBase.log MYBASE.4DL None None

Diagnosis and recovery: Despite the incident, the update occurred


correctly. Restart the original database.

4D Backup Reference 109


Appendix B Rapid Recovery Methods

Second case

Files on the database machine Files on the mirror machine


MacOS Windows MacOS Windows
MyBase.log + MYBASE.4DL + None None
Log to Send SENDING.4DL or or
or or Log Receiving RECEIVE.4DL
MyBase.log.2 MYBASE.4L2

Diagnosis and recovery: The log file was not sent to the mirror (or not
completely sent).
1 On the mirror machine, erase Log Receiving (MacOS) or RECEIVE.4DL
(Windows), if it exists.
2 Launch the mirror.
3 Launch the original database.
4 Perform a mirror update.

Note If MyBase.log.2 (MacOS) or MYBSE.4L2 (Windows) exists on the


database machine, rename it Log to Send (MacOS) or SENDING.4DL
(Windows).

Third case

Files on the database machine Files on the mirror machine


MacOS Windows MacOS Windows
MyBase.log MYBASE.4DL Log Analyzing ANALYZE.4DL

Diagnosis and recovery: The log file was sent to the mirror, but not
integrated.
1 On the mirror machine, integrate Log Analyzing or ANALYZE.4DL into
the mirror database.
2 Erase Log Analyzing or ANALYZE.4DL.
3 Launch the mirror.

110 4D Backup Reference


If an Incident Occurs During the Mirror Update

Fourth case

Files on the database machine Files on the mirror machine


MacOS Windows MacOS Windows
MyBase.log MYBASE.4DL Mirror Log MIRROR.4DL

Diagnosis and recovery: The mirror database was updated, but its
complete backup was interrupted.
1 On the mirror machine, use 4D Backup to create a backup of the
mirror database.
Place the archive in the MyBase• folder (MacOS) or the MYBASE.MIR
directory (Windows).
2 Erase Mirror Log.
3 Launch the mirror.

Situation 2. Only the In this case, the original database is unusable and the mirror database
Original Database Is is intact. Resetting consists of copying the mirror database on the data-
Damaged base machine. There are several cases, depending on the state of the
log file integration and the files present on each machine.

First case

Files on the database machine Files on the mirror machine


MacOS Windows MacOS Windows
MyBase.log + MYBASE.4DL + None None
Log to Send SENDING.4DL or or
or or Log Receiving RECEIVE.4DL
MyBase.log.2 MYBASE.4L2

Diagnosis and recovery: The log file was not sent to the mirror (or not
completely sent).
1 On the mirror machine, erase Log Receiving (MacOS) or RECEIVE.4DL
(Windows), if it exists.
2 Copy the data file from the mirror database to the original database
machine.
3 Successively integrate the files Log to Send and then MyBase.log
(MacOS) or SENDING.4DL and then MYBASE.4DL (Windows) into the
original database.
4 Open the database with 4th Dimension or 4D Server and select
MyBase.log or MYBASE.4DL as the current log file.

4D Backup Reference 111


Appendix B Rapid Recovery Methods

5 Launch the mirror machine.

Note If MyBase.log.2 (MacOS) or MYBASE.4L2 (Windows) exists on the


database machine, rename it Log to Send (MacOS) or SENDING.4DL
(Windows).

Second case

Files on the database machine Files on the mirror machine


MacOS Windows MacOS Windows
MyBase.log MYBASE.4DL Log Analyzing ANALYZE.4DL

Diagnosis and recovery: The log file was sent to the mirror, but not
integrated.
1 On the mirror machine, integrate Log Analyzing or ANALYZE.4DL into
the mirror database.
2 Erase Log Analyzing or ANALYZE.4DL.
3 Copy the data file from the mirror database to the original database
machine.
4 Integrate MyBase.log or MYBASE.4DLinto the database that you just
copied.
5 Open the original database with 4th Dimension and select MyBase.log
or MYBASE.4DL as the current log file.
6 Launch the mirror.

Third case

Files on the database machine Files on the mirror machine


MacOS Windows MacOS Windows
MyBase.log MYBASE.4DL Mirror Log MIRROR.4DL

Diagnosis and recovery: The mirror database was updated, but its
complete backup was interrupted.
1 On the mirror machine, use 4D Backup to create a backup of the
mirror database.
Place the archive in the MyBase• folder (MacOS) or MYBASE.MIR
(Windows).
2 Erase Mirror Log or MIRROR.4DL.
3 Copy the mirror database to the original database.

112 4D Backup Reference


If an Incident Occurs During the Mirror Update

4 Integrate MyBase.log or MYBASE.4DL into the original database.


5 Open this database with 4th Dimension or 4D Server and select
MyBase.log as the current log file.
6 Launch the mirror.

Situation 3. Only the If only the mirror database is damaged, you must reinstall the mirror.
Mirror Database Is
Damaged
1 Delete the unusable mirror database.
2 From the original database machine, delete MyBase.log.2 (MacOS) or
MYBASE.4DL, and/or, Log to Send (MacOS) or SENDING.4DL
(Windows), if they exist.
3 Copy the original database to the mirror machine.
4 Launch the mirror.

Situation 4. Both This rare situation can occur, for example, when a power outage takes
Databases Are place at the same time that the cache is being written to disk and the
Damaged log file is being integrated on the mirror.

The log files appear as follows:


■ MyBase.log (MacOS) or MYBASE.4DL (Windows) on the original
database machine
■ Log Integrating (MacOS) or RESTORE.4DL (Windows) on the mirror
machine

Recovering the database consists of restoring the database from the


mirror backup, and then integrating the log file.
1 Erase the damaged data file from the mirror.
2 Restore the mirror database from the last backup of the mirror data
file and place it in the same folder as the mirror database.
The mirror backup is located in the MyBase• folder (MacOS) or
MYBASE.MIR directory (Windows) at the top level of the mirror backup
disk.
3 Integrate Log Integrating (MacOS) or RESTORE.4DL (Windows) into
the restored database.
4 Delete Log Integrating (MacOS) or RESTORE.4DL (Windows).
5 Copy the data file from the mirror database to the original database.

4D Backup Reference 113


Appendix B Rapid Recovery Methods

6 Integrate MyBase.log (MacOS) or MYBASE.4DL (Windows) into the


original database.
7 Launch the mirror and the original database.
8 From the original database, choose the MyBase.log (MacOS) or the
MYBASE.4DL (Windows) file as the current log file.

114 4D Backup Reference


C 4D Backup and
Customizer Plus

Customizing 4D Backup
You can customize several aspects of 4D Backup using the Customizer
Plus utility, which is included with both 4th Dimension and 4D Server.

This Appendix presents the parameters that you can set for the
4D Backup plug-in. Please refer to the 4th Dimension Utilities Guide for
details on using Customizer Plus.

The options that you can set apply only to the stand-alone 4D Backup
application. When 4D Backup is integrated with 4th Dimension, the
4th Dimension environment parameters are used. As a result, Custom-
izer Plus allows you to set parameters for the stand-alone 4D Backup
application. You cannot set parameters in the Backup.4DX or
Restore.4DX.

When you open the 4D Backup plug-in with Customizer Plus, the fol-
lowing dialog appears:

Macintosh Windows

To display the parameter option windows, double-click the resource


icon.

4D Backup Reference 115


Appendix C 4D Backup and Customizer Plus

Parameter Options
Script Manager This window enables you to define the systems of comparison and
sorting used by 4D Backup.

■ The Comparison mode menu enables you to set the methods used to
perform sorts and searches.
■ The TRIC Resources menu enables you to choose the TRIC resource to
use. The TRIC resource defines how sorts and searches are performed in
4th Dimension and 4D Server.
If you have modified the TRIC resource of your 4th Dimension or
4D Server, use Customizer Plus to assign 4D Backup the same TRIC
value.

Note The parameters that you choose in this dialog box are identical to
those defined in the 4th Dimension environment for integrating the
log file and the 4D Backup mirror update.

The function of these options is identical to those of 4th Dimension. For


more information, refer to the Customizer Plus Reference.

116 4D Backup Reference


Parameter Options

Preferences This window enables you to optimize memory use for 4D Backup
(Windows Only)

The parameter settings are applied when 4D Backup

These options are identical to those set for 4th Dimension. For more
information, refer to your 4th Dimension User Reference. For more
information, refer to the Customizer Plus Reference.

4D Backup Reference 117


Appendix C 4D Backup and Customizer Plus

118 4D Backup Reference


Index
Symbols on non-ejectable volumes 37
See also backups
.4BK (backup file) 50
setting backup parameters 30
.4BL (log file backup file) 50
backup files
.4BR (archive description file) 50
contents 48
.4DL (log file) 50
damaged 44
.log (log file) 50
definition of 44–45, 48–50
.MIR (name of folder of mirror database backup) 84
generated by 4D Backup 44–45
naming conventions 37–40
Numerics opening 50
restoring 48–53
4D Backup
Backup Journal files 47
as an independent application 12
viewing the contents of 47
as modules 12
Backup menu 14
generated files 43, 48
backup parameters
launching 12
setting manually 30
main window 13
backup preferences
overview 11
delete oldest archive 33
windows overview 13, 16
increment backup counter 34
4D Client
limit the size of segments 35
connecting to the server 87
Backup Project files 45–47, 87
4D Server
creating 46, 87
Backup Scheduler 40–42
for mirror backup systems 87
4D Write
opening 46, 87
integration with other products 12
saving 46, 87
backup projects
A default 46
Backup Scheduler
ADSP protocol 89
full backups 40–42
archives 20
mirror updates 91–93
storing 20
backup sets
setting number of 32
B Backup.4BP 87
backups
backing up
access to database during 43
comparison of locations 20
archiving 33
comparison of methods 19
executing 36
comparison of storage units 20–21
launching 36
from the 4D Backup application 36
naming conventions for 38–40
in the User environment 36
number of sets of 32
log files 62–64
on ejectable volumes 40
mirror databases 84–90
on multiple volumes 28–29
on ejectable volumes 37
on non-ejectable volumes 37
on floppy disks 37
restoring 48–53
on multiple volumes 28–29, 39–40

4D Backup Reference 119


Index

restoring segmented 53 error codes


See also backing up User environment 99–104
selecting volumes for 27 errors
storing 21 data entry, correcting 68
verifying 30 User environment 99–104
BK FULL BACKUP WINDOW command exporting the log file 78
accessing the Full Backup window with 26
BK SET FILENAME command
and archiving 33 F
BK Update mirror function 94 Field Selection dialog box 73
fields
viewing in log file 73
C files
closing Backup Journal 47
log files 61 Backup Project 45–47
computers enclosing 31
maintaining 22 generated by 4D Backup 43, 48
Log 55
Mirror Project 45–47, 85
D restoring 48–53
data entry errors floppy disks
correcting 68 backing up on 29, 37
data files naming conventions for 38
backing up 30 full backup
restoring segmented 52 limit the size of segments 35
data segments Full Backup window 15, 25–33
restoring 52 accessing 14, 25
database access Database to Backup area 30
during full backups 43 Destination Volume area 26
database machines Destination Volume Information area 28–30
for mirror backups 80 full backups. See backups
protecting from damage 21–23
databases
connecting to server 87 G
recovering 105–114 generated files 43, 48
restored 69
restoring 48–53, 98
disk verification 51 I
integrating
log files 65–77
E log files, interactively 68–69, 76
ejectable volumes multiple log files 77
backups on 37–40 integration with other products 12
definition of 29 interactive integration
enclosures 31–32 definition of 66
adding 31 performing 68–69, 76
definition of 31 IPX protocol 88
removing 31
Erase Disk check box 30

120 4D Backup Reference


Index

L setting parameters for 83–90


structure files and 81
locations
updating 91–98
for backups 20
verifying updates of 90
Log File menu item 58
mirror databases
log files 55–78
backing up 84–90
and mirror backups 64, 95–96
restoring from 98
and restored databases 69
selecting manually 89
backing up 62–64
setting up 80–90
closing 61
updating 91–98
conceptual overview of 56
verifying updates of 90
contents of 55, 72
mirror machine 80
creating 58–60
setting up 80–90
exporting 78
specifying network component 87
integrating 65–77
Mirror Project files 45–47, 85
integrating multiple 77
creating 46, 85
making mandatory 61–62
opening 46, 85
naming conventions 63–64
saving 46, 85
opening 65
mirror update. See
restoring 65, 69
mirror backups
searching for operations in 74
Mirror window 16
transactions in 56
accessing 84
viewing fields in 73
Destination Volume area 84
viewing operations in 71
Destination Volume Information area 84
logical mirror
Mirror Database area 84
optimizing 82
Stop Mirror button 84
See mirror backups, mirror databases, mirror ma-
mirror. See
chine
mirror backups, mirror databases, mirror machine
setting parameters 82
modules
4D Backup as 12
M multiple data segments
and mirror backups 81
Mandatory Log File check box 61–62
restoring 52
manual
multi-volume backup
conventions viii
limit the size of segments 35
hypertext navigation vii
multi-volume backups
using vii–ix
creating 28–29, 39–40
mirror
naming conventions 40
optimizing 82
restoring 53
setting parameters 82
mirror backups
and multiple data segments 81 N
and transactions 94
network
conceptual overview of 93, 96
for mirror backups 80
configuration 81
quality considerations 23
deleting old archives 85
network components
incidents during 107–114
specifying 87
requirements for 80
restoring from 98

4D Backup Reference 121


Index

networks R
multiple zones 89
recovering
no zones 89
databases 105–114
No Log File menu item 58
recovering. See also restoring
Restore Log window 16
O accessing 14, 68
closing 77
opening
Restore window 15
backup files 50
restoring
Backup Journal files 47
backups 48–53
Backup Project files 46
log files 65
Backup Project files for mirror systems 87
multi-volume backups 53
Full Backup window 14
with a mirror database 98
log files 65
restoring files
Mirror Project files 85
verifying 51
projects 46
Restore Log window 14
restored databases 69 S
Update Mirror window 14
searching
operations
in the log file 74
integrating 75
segmented backups
searching log file for 74
creating 28–29, 40
optimizing a logical mirror 82
naming conventions 40
segmented data files
P and mirror backups 81
restoring 52
parameters
sets
for full backups 30, 45
setting number of 32
for mirror backups 45, 83–90
Show Fields menu item 73
planning
Stop Mirror button 84
for database recovery 24
storage units
Plug-ins menu 14
choosing 20–21
power supply
life-spans of 22
ideal 23
structure files
preferences
and log file integration 66
delete oldest archive 33
and mirror backups 81
increment backup counter 34
backing up 30
limit the size of segments 35
project files. See projects
project parameters. See projects T
projects 45–47
TCP/IP protocol 88
creating 46, 85, 87
transactions
definition of 45
and log files 56
opening 46, 85
and mirror backups 94
saving 46, 85
See also Backup Project files, Mirror Project files

122 4D Backup Reference


Index

U
uninterruptable power supply (UPS) 23
update 86
Update Mirror menu item 86
Update Mirror window
accessing 14, 86
Database to Backup area 87
Destination Volume area 87, 89
Mirror Server area 87
Project menu 87
Verify Backup check box 90
updating
mirror databases 91–98
UPS. See uninterruptable power supply

V
Verify Backup check box 90
verifying backups 30
viewing
log file operations 71
volumes
attributes of 29
displaying characteristics of 28
ejectable 40
for mirror backups, selecting 84
list of connected 26
multiple 28–29, 39–40
non-ejectable 37
selecting backup destination 27

4D Backup Reference 123


Index

124 4D Backup Reference

You might also like