Backup databases and html files

Chong-ho (Alex) Yu, Ph.D., MCSE, CNE

Problem:

I want to backup all my FMP databases and html files daily. What should I do?

Solution:

There are several ways to backup data. You can use File Maker Pro Server, Lasso Server from Blue World, or Script Scheduler from Wave in Motion to schedule auotmatic backup of your databases, but they cost extra money. Also, if you do web publishing only but not file sharing, running File Maker Pro will affect the web server performance.

A free solution is to use AppleScript and Crontab together. AppleScript is a system level scripting language in Mac OS. It allows you to write scripts to automate tasks such as copying folders and files from one place to another. Crontab is a UNIX-like utility, which can activiate applications created in AppleScript in a pre-determined schedule.

AppleScript is built-in with Mac OS. You can find Script Editor in the folder Apple Extra. Crontab is a shareware, which can be downloaded from www.shareware.com or www.download.com. Installing Crontab just requires a few clickes.

To create a script and compile an application to do copying, do the following:

  • Create two empty folders name "Web" and "Web Security" in your removable media.
  • Open Script Editor and press the record button.
  • Drag the empty folders just created into the trash can.
  • Empty the trash can.
  • Copy the folders "Web" and "Web security" from your hard drive to a removable medium (e.g. Zip, Jazz) or another partition of the hard drive.
  • Press the stop button in Script Editor. Script Editor should record your action into a script. It is important to erase "Web" and "Web security" in the removable media first, otherwise the process will halt and prompt you whether you want to overwrite the folders with the same names. In an automatic backup process, no one will be there to answer the prompt.

     

     

  • Run the script to verify it.
  • If the script can run correctly, save the file in the folder "Crontab Software" and name it as "FMP_backup." Select the file type as Application (In OS 8.x) or Classic Applet (in OS 9), and check the box "Never Show Startup Screen." Saving it as a standalone application can make it execute without Script Editor. Checking the latter choice can make the application run without a prompt. Again, during backup you won't be present to answer the prompt.

     

    Script editor

     

  • Open Crontab and select Edit Schedule.
  • Simple Text should be invoked to open the schedule file. In the last line of the schedule file, type 59 23 * * * nobody "FMP_backup". It means that every year every month every day at 11:59 pm execute the application "FMP_backup" and no specific user is assigned to run this.

Because the preceding backup procedure is automatically performed without the presence of a human-being, the backup will fail when prompts need to be answered by a human. For example, if certain files in the trash can are locked, old files will be not deleted unless a person deletes those locked files manually by holding down the option key. Therefore, it is a good practice to empty locked files in the trash can before the scheduled backup starts.

Caution:

Windows servers have built-in backup/recovery software, which is accessible from System Tools. However, it just gives you a false sense of security. The backup process would archive files that are not in use only. As you know, FileMaker Pro databases must be open in order to be available via the Web. As a result, those databases would not be stored in the back up file.

 

Summary:

Product

Source

Platform

Cost
(may vary)

File Maker Pro Server

File Maker Inc.

$1400.00

Lasso Server

BlueWorld

$450.00

Script Scheduler

Wave in Motion

$79.00

Crontab

Shareware.com
Downlaod.com

Free


Navigation

FMP Tips Contents

Other computer tips

Search Engine

Credit/Copyright ©

Simplified Navigation

Table of Contents

Contact Me