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

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

Recommended Posts

Posted

Although I still consider myself a novice, one thing I've learned over the years of developing FM applications is the importance of frequent backups and testing.

 

While developing a new program, I like to maintain a history so I can look back and see what I did in the past. I also like to test scripts that create delete or modify records without the fear of altering the original records in any way. I have written two scripts to do this.

 

Backup script creates a copy of the current file and places it in a folder named Backup located in the parent folder (the folder that contains the development file). The scrip appends the word BACKUP, a backup number and a date to the original filename. After 25 backups, the backup numbers start over again at 1 (25 is arbitrary and can be easily changed). As the backups accumulate over time, I usually delete the oldest ones when I am sure I no longer need them.

 

Test Copy script creates a copy of the current file and places it on the Desktop where it can be quickly found and used. The script appends the words TEST COPY and a copy
number to the original file name. A date is not included in the file name because after using a test file once I usually delete it. Any changes I need to make to the script are made in the original file only. I then create another test copy and test again.

 

I place links (or buttons) to run the scripts on a convenient layout where I can access them quickly and easily.
 

After development is complete, I leave the Backup script and its link in the operational file. It's an easy way to back up so you're more apt to do it.

 

You could of course use the Save As command to create backup and test copy files. But if you do this frequently you'll quickly find that it's very cumbersome.
 

For those who are interested, the attached demo contains the two scripts that I use. It was made with FM 11 Adv. Try them out and see if they work for you. Download the demo, un-zip it, place it in a new folder and create a subfolder inside and name it Backup. The Demo is then ready to go.



 

Posted

I load the development file onto FMS and have it set to backup every hour or so during development.

 

Having the file on FMS means that even if my machine crashes the database will be ok UNLESS the crash happens while I was in define fields or security dialogs.

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