Jump to content

Copying database to a local machine for developing - Consistency problems


rikkib

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

Recommended Posts

  • Newbies

Hello,

 

I have taken on a database developed in Filemaker 7 and it is currently running in Filemaker Server 11.

 

I need to setup a development environment so that I am not working on the live system for obvious reasons. I read an article on the Filemaker website on the ways to do this. I chose the option to copy the files from a backup to a local machine to work on. I copied all of the database files from the backup on the server to my local development machine.

 

The database does work in a way but most of the files I try to open it tells me "This file was not closed correctly - performing consistency check". I have tried running the "recovery" option on some of the files but even the recovered version of the files still come up with this error, so every time I try to open them it has to perform this consistency check. This isn't ideal as it is slowing the development down a lot due to having to perform the check every time I want to test a change I made.

 

I saw an article claiming it is possible to disable the consistency check as a last resort but cannot find that option anywhere. Ideally I would like to still use the consistency check if there is a way for me to solve this problem.

 

What would be my best option to solve these issues?

 

Thanks for any help you can provide.

 

Rikki

Link to comment
Share on other sites

Even if it was possible, you would not want to disable the consistency check.  That would putting your head in the sand instead of solving the issue

 

It sounds like you are NOT copying from the backup location but copying from the live folders; which is only possible if those folders are shared on the OS-level and THAT is very very very dangerous.  It is the #1 known cause for corrupted files (by the risk of other processes - like copying - touching the live files).

 

FMS backup files are always closed properly.  Are you taking files from an FMS backup schedule or from some other backup software's backup (for instance: a Windows VSS snapshot)?  If the latter; it means that they are taking a copy of the live files without pausing FMS.  Only use FMS itself to take backups.

 

 

The best setup to do what you need is:

 

- disable all file sharing on the FMS box

- disable all other backup mechanisms except FMSs (or at the very least, configure the other backup to exclude the FMS live files)

- set up remote desktop access on the FMS box

when you need a backup

- log into the remote desktop on the FMS box

- find a backup --> stay away from the live folders!

- zip it

- copy it to a networks share somewhere on the network (or share a folder on your desktop for the purpose).

  • Like 2
Link to comment
Share on other sites

Hmm. This is new to me. I always thought copying a file from the Databases Folder in FMS to another machine would be fine as long as the file was not in use at the time. I do this so FMP files on my desktop machine back themselves up Wim, are you saying that simply dragging a file from the Database folder to the desktop of another machine can damage the file on the server?

 

edit: As well, on a Mac, how would a person access any file on the server machine if file sharing is off? Screen Sharing?

Link to comment
Share on other sites

I always thought copying a file from the Databases Folder in FMS to another machine would be fine as long as the file was not in use at the time

 

As long as FMS has the file open, it is *always* in use so you should not touch it in any way.  How would you be able to tell that the file is not use at the time?

 

edit: As well, on a Mac, how would a person access any file on the server machine if file sharing is off? Screen Sharing?

 

They wouldn't if file sharing is off

Link to comment
Share on other sites

Thanks Wim,

 

I meant I would close the files on the server before dragging them to another machine. As well, I am the only user. One thing I'm still missing. How would a person copy over even a backup file if file sharing is turned off? I don't have Remote Desktop. Mac.

Link to comment
Share on other sites

  • Newbies

Thanks for your responses.

 

I found out that I was given the wrong copy of the files by my boss. I managed to get a copy of the automated backup files from this morning before work started and those files did not have the same issues. I assume he must have copied the files directly from the live system assuming it would be fine.

 

Thanks for the help.

 

Rikki

 

Edit: As you say do not touch the live files at all, is it not OK to modify the layout, fields etc on the live system either in that case?

Link to comment
Share on other sites

Thanks Wim,

One thing I'm still missing. How would a person copy over even a backup file if file sharing is turned off? I don't have Remote Desktop. Mac.

 

Turn on remote desktop sharing, it's built into OSX too.  OSX > System Preferences > Sharing - first item is "screen sharing"

Link to comment
Share on other sites

 

 

Edit: As you say do not touch the live files at all, is it not OK to modify the layout, fields etc on the live system either in that case?

 

Modifying the schema in FM on a hosted file has its own set of issues.  Just like FM has a record lock when you are modifying a record, it also has a schema lock that may prevent users from doing what you intended to do.

 

Check out the error numbers below.

 

 
  • Like 1
Link to comment
Share on other sites

Thanks Wim,

That's how I currently have it set up. However, it still involves dragging one group of files or other to another machine. If it's not safe to drag a "live" file, what's the difference with dragging one of the backups? I should qualify this once again by saying that my other machines are the only clients. I'm the only client. So I DO know if a file is being used. I realize this is not a typical scenario so I understand the advice you've given in the previous posts on this thread.

Rick.

Link to comment
Share on other sites

If it's not safe to drag a "live" file, what's the difference with dragging one of the backups?

 

HUGE difference.  It does not matter if any client has the files open.  When FMS opens a file for hosting it sets a flag to say "I - FMS - have the files open".  That flag only gets cleared when FMS pauses the files or closes the file.

If you copy a hosted file without pausing it first  you will get a file with the "dirty flag" set.  And it will trigger the consistency check every time.  And for all we know FMS may have been in the process of flushing the cache to disk and modifying the file.  Which is the whole point of having exclusive lock in the first place.  You have no control over when FMS flushes the cache, it's part of the server process.  You may also be copying the file in the middle of a server-side schedule or a backup or a progressive backup...  JUST DON'T DO IT!

 

A backed up file is clean and safe to copy.

Link to comment
Share on other sites

Thanks again Wim,

Very valuable information. I will follow your advice. There really isn't much point in copying the files over anyway. I thought I was being extra safe by having yet another occasional backup. Turns out the opposite is true!

Rick.

Link to comment
Share on other sites

This topic is 3373 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.