What I am looking for is a script which triggers the computer which is serving the Databases to save a backup file on that computer. Is there any way to make this happen?
Computer "Office01" is hosting two databases and sharing via IWP. A user logs into one of the databases on computer "Office02". They click a scripted button which commits a record and somehow that triggers Office01 to save a backup file on Office01's hard drive.
I am still looking for an answer to this question. Anyone have any suggestions?
Thank you for your posts.
Usually, backups are done on a schedule using FileMaker Server.
One way of doing this with FileMaker Pro is to create a script that looks for a value in a field. When true, replace the value with the original value and then backup the file. Here is a possible script:
Allow User Abort [On]
Set Error Capture [On]
Perform Find [Restore] // look for the value "1" in a field "Update"
If [ Get ( FoundCount ) > 0 ]
Replace Field Contents [ No dialog ; Update ; "" ]
Save a Copy as [ copy of file ; <name of saved file> ]
Pause/Resume Script [ Duration (seconds) ; 5 ]
Show All Records
We "Allow User Abort" because we need a way to stop the loop. Error Capture is turned on because most of the time, zero records are going to be found, and we need to trap that.
Inside the loop, we look for a value in a field. If we find a record, we replace the contents and save a copy of the file. If not, we pause for 5 seconds. We then Show All Records and loop again.
When an web user presses a button to commit a record, the script will place a "1" in the Update field. Then, when the looping script sees this change, the file is backed up. Does that make sense?
I will try a variation of your suggestion. Thanks for helping to steer me in the right direction!