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

Backing Up Runtime Bound Files


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

Recommended Posts

Posted

I am developing a runtime solution that has many files that will be bound, but only three or four that require backing up. I have created a script that makes a copy of three files with the Troi File plugin. I have set it up to close each file and make a copy of each which is stored in the backup folder--none of these files are the primary runtime file.

From what I understand, only the primary file can be replaced without rebinding if the code has been modified. Does this apply to exact copies of the originally bound files? That is, can I set up a script with the Troi plugin that will replace the original files with the backup files? Importing would be the other alternative, but what happens if the original files are damaged. I'm trying to avoid forcing my clients into having to reinstall the runtime solution and then have to Import from the backup.

Also, it would be great if there was a way to backup the primary file from a script. So far, everytime I've tried to import the primary information I get a message that the file was improperly shutdown--recovery necessary.

(Example of files: Primary.usr (would be nice to back up--solution code, but does create indexed records with match field to other file records), file1.usr (user info needs to be backed up), file2.usr (solution code doesn't change--no backup needed), file3.usr (user prefs needs back up), file4.usr (solution prefs--one rec that changes info based upon user input, so needs backup), file5.usr (reference info--no backup), etc.)

Any ideas? I'm fighting the clock on this one. I don't want to provide solution without backup capability. Thanks in advance...

Posted

I think you are confusing 2 different issues: backing up versus upgrading a solution (because of bug fixes or improvements, etc.).

Using Troi, you can create a backup of any file in your solution. The problem you're having is in trying to replace your primary file while it is open because that is where you're running the 'Restore' script from. Since it's open, you'll always get an error. What I've done is to create a separate file (but still bound as part of my solution) that does one thing: it restores all the other files in the solution.

If you are on the Win platform, you may want to consider using WinBatch to create a zip file (transparently) of all the files in your solution and then it can easily unzip them.

As to the upgrading or file replacement, if you bind the solution using the same binding key, you can replace any file in the set.

Posted

Thanks Steve. Actually, I had figured out the binding when I re-read the FM Dev manual. I also created a separate bound file solely for backups. The Troi plugin creates a backup folder on the first launch of the program. On quit, the backup file is opened and the other files are then closed. I then use the Troi plugin to copy the closed files to the backup folder. Since they're bound files, it creating a restore script seems a bit redundant. The user should be able to replace the original files with the backups.

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