.
 
Enterprise 6 Suite
.
 
 
 

Backup and Recovery using 4D Backup

Introduction
------------------------------------------------------------------------

Please use this document in conjunction with our technical note Backup and Recovery Strategies.

In this document we will cover:

The concept of 4D Backup

Tricks and tips for using 4D Backup

Tricks and tips for mirroring with 4D Backup


The concept of 4D Backup
------------------------------------------------------------------------

4D Backup is a tool for DBAs who are responsible for mission-critical databases. 4D Backup can perform stand-alone backups of 4D databases; it can also work in conjunction with 4th Dimension or 4D Server to perform scheduled backup and mirroring. To use 4D Backup, you need to take the following steps:

Turn on the Mandatory Log File preference

Use 4D Backup to make a full backup of your structure, data, and other necessary files. This becomes your starting point.

Create a Backup Project to save your preferences and other settings.

Create a transaction Log File to record all changes to the database.

Set up a Mirror on another machine. This mirror contains a copy of the database, structure, 4D Server, and all related files.

Launch your database on the primary server. As the users make changes to the database, 4D Backup stores those changes in the transaction log. This log file is not indexed, and it only contains the fields that were actually modified. Therefore, writing to the log file has little or no effect on the performance of 4D Server.

At regularly scheduled intervals (for example, every half-hour), 4D Backup on the main server sends the log file to the mirror machine. The Mirror machine automatically "integrates the log file" into the mirror copy.

After it integrates the log file, 4D Backup creates an additional backup of the database on the mirror machine. This means that you always have at least two copies of the database on the mirror machine: the current mirror, and the most recent backup.

At regularly scheduled intervals (for example, every evening after business hours), 4D Backup makes another complete backup, this time on your primary server machine. This means that you always have at least four copies of your data: two on the server machine, and two on the mirror machine.

If the Primary Server goes down, you can go to the Mirror machine, integrate the latest log file that has not yet been mirrored, launch 4D Server on the mirror machine, move licenses to the mirror machine, and instruct the users to connect to the Mirror machine instead of the primary Server. Even if your database is several gigabytes, you can complete the entire process in less than 15 minutes.

Tricks and tips for using 4D Backup
------------------------------------------------------------------------

4D Backup has many powerful features that make it an ideal tool for helping you to get your database back on-line quickly in case the primary server goes down. The following sections list of the most important features. For step-by-step instructions on the use of these features, see the 4D Backup Reference Manual.

Mandatory Log File option

The entire backup and recovery process works on the assumption that 4D Backup has been maintaining a real-time log file of changes to the database, as they were happening. Therefore, it is imperative that you turn on the Mandatory Log File option. To do this from within the 4D Server application, highlight the File menu, select Database Properties and then click on the second tab called Data Control and Access, check the Mandatory Log File option and click OK.


Performing full backups

When you click the Full Backup button, 4D Backup presents a dialog that allows you to do a complete of backup of your structure, data, and related files.

Here are some hints and tips about performing Full Backups.

If you are making your backups to the same drive as the originals, 4D Backup will warn you that this is not a good practice. If you must continue with the backup on the same drive, you should copy the backup to another drive after it is done.

When prompted to save the backup parameters in a project, always choose "yes." Having this project will save you time later.

If you want to save disk space, you can use a compression utility such as WinZip (Windows) or DiskDoubler (Macintosh) to compress the backup file. You can save as much as 70% of the space that is used by the uncompressed file. If you do compress the backup, be sure to compress it as a self-extracting archive (SEA), so you will be able to expand the file, even if you do not have the application that compressed the file.

Include all the 4D Extensions that the application needs as a part of the backup. When you are backing up from within 4D or 4D Server, make an extra copy of the extensions that are in the Mac4DX and Win4DX folders and include those extra copies as Attachments. The reason you cannot use the originals is that 4D Backup cannot make backup copies of extensions while they are in use.

Restoring a Backup

Always click the Verify button, both for a backup or for a restore. The backup will take a bit longer, but you will be assured of having a true copy.

Tricks and tips for using the Backup Mirror
------------------------------------------------------------------------

Setting up a Mirror is the best way to ensure that your system will never be down for more than a few minutes at a time. If your primary machine goes down, you can integrate the latest log file, transfer licenses to the mirror, and be back up and running in less than 15 minutes.

Setting up a Mirror with 4D Backup is relatively simple and straightforward.

Mirror to the Same Platform

Although 4D Backup supports cross-platform mirroring (Macintosh to Windows or Windows to Macintosh), the ideal situation is to mirror to a similar machine on the same platform (i.e. the same processor type and operating system). The reasons for this recommendation are:

This same-platform mirror is the simplest and most trouble-free. You will have fewer chances for error than you will have if you mirror cross-platform from (for example) an NT server to a Mac server.

When you are preparing your mirror, you should shut down the primary server long enough to install the same 4D Server license number on the mirror server. As long as both copies of 4D Server are not running at the same time, 4D Server's licensing will allow you to do this.

If your hard drive crashes on the primary machine, you will be able to use the same 4D Server Expansion Packs on the mirror machine that you had been using on your primary server. During the installation process, expansion packs store the license number of the server to which they belong. They can be re-installed, even after they have been used, as long as they are installed into a copy of 4D Server that has exactly the same license number as the original installation.

In other words, if your primary hard drive crashes, you will be able to recover, even though you had not de-installed the licenses from the original server. This is the "safety net" that is built-in to 4D Server.

Windows and Macintosh have different numbering series for 4D Server licensing. Therefore, if your primary server is on an NT machine and your backup server is on a Mac, then it will be impossible for both copies of 4D Server to have the same license number. Therefore, in order to ensure quick recovery, you will have to have to purchase two copies of 4D Server (one Macintosh and one Windows). You will also have to purchase two sets of expansion packs, one for Macintosh and one for Windows. This is an unnecessary expense.

Experiment with different networking protocols

Although you may be using one networking protocol as your primary mode of communication between 4D Client and 4D Server, do not assume that the same protocol will be the best choice for communication between your primary server and the mirror machine. If you are having trouble communicating with mirror using your primary protocol (e.g., ADSP), then you should experiment with the other two protocols: TCP/IP and IPX/SPX. It may be that the reduced traffic in a different protocol might yield a more reliable mirror environment.


Save your Backup and Mirror projects

4D Backup allows you to save your settings for backups and mirrors. You should do this to save time and increase efficiency. Whenever you create a backup project or make changes to an existing project, a dialog appears. Normally, you should click Save to save the project parameters. However, we have had user reports that sometimes a Windows to Mac cross-platform mirror will fail if the backup project was saved before the first mirror was performed. In that case (if you are mirroring cross-platform Windows to Mac), you should wait until after you have performed the first Send Log operation to create a backup project file on the primary server.


Use the Backup and Mirror Scheduler

4D Backup provides you with a Scheduler to set times for automatic backups and automatic mirrors.


Conduct regular "fire drills"

The military, the fire service and many other crisis-response organisations perform simulations of emergencies. If your database is truly mission-critical, meaning that your organisation cannot function if the database is down for any length of time, then you should conduct emergency drills. About once a month, simulate a hardware failure.

Go through the motions of transferring from the primary to the backup:

Integrate the latest log file.

Launch 4D Server on the mirror.

Install the user licenses on the mirror machine.

Ask the users to test the 4D Client connection to the mirror machine.

You should have a recovery goal, for example: "never down for more than 15 minutes." When you do the simulation, you should count the minutes that it takes to do the changeover operation. When the drill is finished, compare the results against your goal. Continue to improve the process until you can comfortably meet your goal, and then do the drill once a month to maintain proficiency.

Summary
------------------------------------------------------------------------

If you apply the rules and techniques that we have discussed in this technical note, in conjunction with our technical note Recovery and Backup Strategies, you should be able to depend on Daybook Enterprise or Modulus to give you mission-critical, 24 hour a day, seven day a week stability.

11/02
This technical note is based on one produced by 4D. It is used here with permission and thanks.




        

Email: info@daybook.co.uk Copyright © 2004 Daybook Limited, All Rights Reserved!.

Productivity tools
Quark Indesign database extension - Daybook Quark Indesign data publisher
Joan wins prize for her intelligence
Integrating with other products
Options for publishing with InDesign
CRM, Customer Relationship Management, Call Center, Call centre, Diary, Accounts, Sales, Purchase
Publisher Software Solutions for Quark, InDesign, Framemaker, XML, XSLT, HTML
Is there an integrated solution for all company requirements?
Deduplication entry filters
4D Tools
Getting your money back
Accounting Modules
Financial data integrity tools
What is Customer Relationship Management Software?
Further Fields
Mailsort
Using the Price Matrix
Daybook Publisher for indexing and easy gathering of data.
Daybook - Customer service, Diary for Sales, Manufacturing, Recruiters, Job Costing, Timesheets, Design
Enterprise 6 demo