Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

FileMaker 5.5 Server Back - Up


Tomo1

This topic is 8341 days old. Please don't post here. Open a new topic instead.

Recommended Posts

How we do it is: Using the FMS Backup feature, backup the FMS hosted files to a folder on the same drive where FMS is installed. This backup runs several times a day (Morning, Noon, evening, and just before the tape backup routines start) and the files do not have to be closed prior to backing up. Our tape backup then runs every night via scheduled tasks, running a batch file that backs up the back up folder and the FMS installed folder along with a verify. The Friday backup runs a Full backup of the entire drive partitions. We have 2 partitions C: = system only, D: = FMS partition and backup folder. This has worked very well. We have never had to restore from the backups - FMS has been exteremely stable - even through power outages (Like the earthquake back in February). The UPS runs for about 30 min. It always comes right back up. (WinNT4.0 sp6)

Link to comment
Share on other sites

  • 3 weeks later...

On the topic of backing up using schedules in FM Server 5.5 running on Macintosh OS X, there is a problem, which a search of the FileMaker Knowledge Base confirms (see article 107751). In short, the schedule does not run properly and it can spoil your whole day. Problems I incurred included backing up only some of the files and also skipping several days at a time. The KB article provides a Unix fix to get around the problem using the cron daemon to schedule backups. In the meantime, I presume FileMaker, Inc. is doing something about this, but I had not seen anything in the Forums before, or anywhere else, for that matter. Digging it out saved me asking for help here, and, I hope, points FMS 5.5 administrators running on an OS X box in the right direction.

Here is the article from the knowledge base to save you a couple of surfing steps:

FileMaker Server 5.5 For Mac OS X Backup Script Runs Intermittently

------------------------------------------------------------------------

ISSUE:

A problem has been identified in FileMaker Server 5.5 For Mac OS X that can cause scheduled backups to run only intermittently.

RESOLUTION:

Scheduled backups can be reliably accomplished by incorporating a Perl script and a crontab file to activate that script at specified times. This article contains a Perl script that actually carries out the systematic suspending, backup, and reactivation of all properly mounted FileMaker Pro files under FileMaker Server 5.5 for Mac OS X.

Also contained in this article is a crontab file that works with the cron (timed activation) function of Unix to trigger a program, or in this case script, at predetermined times.

The Perl Script

1. The backup.pl file must be edited to redefine the variables for the backup destination path and the FileMaker Server 5.5 folder path that can be unique on each system. These two variables are preceded by comments that explain what to edit.

Using TextEdit, copy the contents of the Perl script (below) into a new text file on your Mac OS X machine. Edit the line

$DEST = "/backup/";

so that it points to a directory on your machine that you wish to backup to. For this example, a directory named /backup/ was created right on the root level.

Now, edit the line

$FMINSTALLPATH = "/Applications/FileMaker Server 5.5/";

so that it actually points to where FileMaker Server 5.5 is installed on your machine. For this example, FileMaker Server 5.5 was installed inside the applications directory.

2. Save the file as 'backup.pl' in your FileMaker Server 5.5 directory.

3. The backup.pl file uses the Unix cp (copy) command to back up the database(s) to the backup directory. The cp command does not copy the resource fork of a file, therefore files that do not have a ".fp5" file extension will lose their icons and application association with FileMaker Pro.

4. The backup.pl file:

- Checks for the existence of the backup directory. If one does not exist, one is created.

- Attempts to Pause all open databases

- Copies all Paused databases (databases that are not paused will not be copied)

- Resumes all Paused databases

- Runs the Resume command again to ensure that any files are not in a paused state. This may result in a error message "Could not pause/resume file "filename" because it is already in a pause/resume state." in the Events.log file.

# The Perl script begins below these header lines. THESE HEADER LINES

# SHOULD NOT BE SAVED IN THE SCRIPT!

#!/usr/bin/perl

# Edit the backup directory path for $DEST

$DEST = "/backup/";

if (!$DEST)

{

print "usage: $0 destinationn";

exit;

}

if (!-d $DEST)

{

print "$DEST is not a directoryn";

`mkdir $DEST`;

}

# Edit the FileMaker Server 5.5 directory path for $FMINSTALLPATH

$FMINSTALLPATH = "/Applications/FileMaker Server 5.5/";

$FMBIN = "FileMaker Server Config.app/Contents/Resources/fmserverd";

`"$FMINSTALLPATH/$FMBIN" pause`;

$ExitStatus = $?;

if ($ExitStatus != 0)

{

print "Error pausing filesn";

exit;

}

@FILES=`"$FMINSTALLPATH/$FMBIN" files`;

foreach $file (@FILES)

{

my($ES) = 0; # Exit Status

chomp $file;

next if !($file =~ /Paused/);

($filename) = ($file =~ /(.*) Paused$/);

print "Copying $filename to $DEST..." ;

`cp "$filename" $DEST`;

$ES = $? ;

if ($ES != 0)

{

print "Error copying filen";

exit;

}

print " $bytesn";

`"$FMINSTALLPATH/$FMBIN" resume "$filename"`;

$ES = $?;

if ($ES != 0)

{

print "Error resuming file: $filenamen";

print "Attempting to resume all filesn";

`"$FMINSTALLPATH/$FMBIN" resume`;

exit

}

}

`"$FMINSTALLPATH/$FMBIN" resume`;

# This perl script ends above this footer line.

The Crontab File

1. Log in as Administrator to your Mac OS X machine.

2. Using TextEdit on Mac OS X, copy the script below and then save it into a PLAIN TEXT file named 'root'.

3. Change to root to carry out step #4. You will need to know how to activate true root access on your OS X machine if you don't already, and then how to become the root user.

4. Move the file into: /private/var/cron/tabs/

mv root /private/var/cron/tabs/

5. When in /private/var/cron/tabs/ as root, change the mode of this root file to allow the owner of the file root to execute the file.

chmod 755 root

6. Exit as root user.

# crontab for the user root

# only edit the MAILTO variable to a valid email account

SHELL=/bin/sh PATH=/bin:/sbin:/usr/bin:/usr/sbin HOME=/var/log

# [email protected]

#

# This is the syntax for cron jobs, each item is separated by tabs.

# min hour mday month wday command

#

# For more information on cron tabs, see man 5 crontab

#

# cron job to backup FileMaker databases every hour of every day

0 */1 * * * /Applications/FileMaker Server 5.5/backup.pl

Link to comment
Share on other sites

This is a known issue. I believe. FWIW, if a schedule is scheduled to run only one time once a day, I believe it will run correctly inder OX X (10.0.4--10.1) with FM Server 5.5v1. At least I have not heard of any reports to the contrary.

However, clearly the scheduler isn't working as we expect it to work.

Old Advance Man

Link to comment
Share on other sites

quote:

Originally posted by Old Advance Man:

This is a known issue. I believe. FWIW, if a schedule is scheduled to run only one time once a day, I believe it will run correctly inder OX X (10.0.4--10.1) with FM Server 5.5v1.

My experience has been that run once a day or several times a day the script has been unreliable and skips days after running once. I have not solved this, and my skill with unix leaves a lot to be desired as I have not been able to get the desired results from the technique in the quoted article.

I think there is a problem with ownership of files in OS X that I had not experienced under earlier operating systems, and this may have contributed to the other problem I have had with backing up only some of the files. I copied a couple of updates to the server but had problems with the server opening them reliably. The solution has 46 databases that have been tweaked at various times. When I could not get the server to host a file, I traced it down to privileges set by the OS.

Several of the files showed ownership by one admiinistrator user, while most of the other files had ownership by another administrator account. Not a problem in itself, but the problematic file was set to read only for groups and others, and resetting the privileges required either logging out and logging back in with the other administrator id and password to reset the privileges. Acutally I took a lazy way out and saved a copy of the file, which itself then had ownership of my account, and I reset the privileges there for read and write. Now to see if any of this affects the scheduled backups.

I have learned that OS X can exert some unexpected limitations on FileMaker Server's services, or at least so I it seems. I am scrambling to learn everything I can about OS X, Unix, and FM Server's quirks, so I hope others out there will share their experiences and correct any faulty inferences I have gleaned so far.

It has been sporting to take on a much more complex system, especially after so many comfortable years in classic mac os. The new stuff keeps me hustling to figure out what I am doing, but, hey, when you're green you grow, when you're ripe you rot.

Link to comment
Share on other sites

This topic is 8341 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.