4DBackup_User_Ref
4DBackup_User_Ref
Reference
Windows and Mac OS Version
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.
All other referenced trade names are trademarks or registered trademarks of their respective
holders.
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
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
iv 4D Backup Reference
Contents
4D Backup Reference v
Contents
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
vi 4D Backup Reference
Preface
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.
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.
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.
Conventions This manual uses certain conventions to help you better understand
the material.
Note Text emphasized like this provides annotations and shortcuts that will
help you use 4D Backup more productively.
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.
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.
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.
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.
Chapter 1 Introduction
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.
Full Backup
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.
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
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
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 degree of protection that you need helps determine the backup
method best suited for your database:
Original Mirror
database database
Backup Location The location in which you save backups also affects the safety of your
backup system:
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.
Other Considerations
This section describes some important points to keep in mind when
implementing a backup strategy.
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.
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.
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.
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.
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.
Uninterruptable Power If possible, you should use a device that provides an uninterruptable
Supply power supply (UPS) to your computers.
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 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).
The most basic features of 4D Backup are the full backup and
restoration of a database.
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
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.
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.
Macintosh
Windows
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.
Selected destination
volume
Destination volume
information
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:
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.
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.
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.
■ Enclosures (any files associated with the database, such as templates for
labels or quick reports)
■ Date of the last backup of the database
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
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.
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.
■ 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.
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.
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.
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.
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.
Note For more information on segmenting backups, see the section “Multi-
volume Backup”.
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.
■ 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.
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.
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.
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 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.
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.
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.
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
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.
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.
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 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.
■ It informs you of an error if the preceding backup has not taken place
correctly
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.”
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.
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.
■ Full backups
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:
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.
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.
■ Mirror updates
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.
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.
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).
Note The name of the current project appears in the title of the backup
window.
When you double-click the icon of this file, the text editor displays the
journal’s contents.
The most recent journals are the most important; you can delete the
oldest ones without risk.
Full Backup File Full backup files can group a number of files in one document. You can
thus fully backup your environment.
Log File Backup The backup of a log file contains only file, the log file:
Contents of Backup Files The following table summarizes the backup files generated by
4D Backup :
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
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.
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.
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.
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.
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.
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.
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
a Addition of “b”
b +a 0
+b 1
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.
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
Log file
Once your database has been backed up, you can generate the log file.
2 Choose Log File from the File menu.
Macintosh Windows
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.
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.
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:
The log file backup is placed in the same directory as the full 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.
On Macintosh
The log file backup is named with two suffixes:
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.
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.
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:
In this case, you can restore the previous database backup and then use
the current log file to add the two records again.
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.
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
1. Complete backup
3. Accident
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
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
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.
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.
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
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.
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,
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.
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.
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.
Addition of a record
Modification of a record
Deletion of a record
Transaction (a transaction can be validated or cancelled)
■ 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.
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.
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.
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.
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.
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.
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.
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.
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 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.
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.
After you have validated the dialog box, the data is exported. A meter
indicates the progress of the operation.
■ A mirror machine
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.
All combinations of platforms are possible, as long as you are using the
proper versions of the software. The following table lists the
combinations:
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.
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.
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.
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.
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:
The Mirror Window This window provides information on the database and on the
volumes connected to the mirror machine.
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.
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.
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
You can create, open, or save your projects using the Project menu.
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.
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.
Network Protocols
Windows MacOS
TCP/IP
Click for
more
choices
IPX
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.
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.
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.
4D Backup sends the log file and displays a dialog box with a progress
indicator indicating the progress of the update.
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.
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.
■ 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 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:
1. Current use
or programmatic execution:
BK Update mirror
Log file
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.
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 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.
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.
At each step, the log file is renamed. It successively takes the following
names:
Network
a Adding “b” a
b Building the +b Waiting
log file Histo.log
Histo.4DL
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
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.
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.
If any errors occur while you are using 4D Backup, the application
alerts you by displaying messages about the error, difficulty, or risk
encountered.
■ An identification number
■ A commentary
Message label
Commentary
Identification number
■ 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.
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.
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.
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 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.
Note For more information on the data cache, refer to the 4th Dimension
documentation.
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).
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.
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
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.
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
Second case
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.
Third case
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.
Fourth case
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
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.
Second case
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
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.
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.
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
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.
Preferences This window enables you to optimize memory use for 4D Backup
(Windows Only)
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.
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
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