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

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

Recommended Posts

Posted

Is there a way to specify in a shutdown script where you can save a copy of the file ONLY when the host closes the file.

For example in the script you have the line that says

save a copy as ["backup.fp7"]

Now is there a way that it WILL NOT save a copy of the file if the user just remoted in but WILL save a copy of the file if the host closes the file down?

THANKS!!!

Posted


If[Get(SystemIPAddress) ≠ Get(HostIPAddress)]

I think that should work.

Thanks Zero!

The scriptmaker didn't like "HostIPAddress" so I replaced it with "HostName" and that seemed to work when I tested it out. However I'm wondering if you know why it didn't like HostIPAddress...I'd like to make sure I'm not doing anything wrong. (also I tried doing HostName for both Get functions and that didn't work).

Posted

HostName will never equal the IP address. Plus, Get(SystemIPAddress) will return a list of all IPs for connected machines.

You would probably be better off using

If [Get(MultiUserState) <> 2]

Posted

HostName will never equal the IP address. Plus, Get(SystemIPAddress) will return a list of all IPs for connected machines.

You would probably be better off using

If [Get(MultiUserState) <> 2]

Are you sure Queue? Mine I ran that from a file on our FM7SA and it only gave me my ip. And we have almost 50 users connected.

Posted

Yes, and how many users are connected to your machine? :wink2:

This would not be useful for a file which is being served via Server, only one where a user is hosting, unless, of course, you have closed the file on Server and opened it locally.

You cannot save a copy while the file is being hosted by Server, anyway, can you?

Posted

Jeesh thanks for all the help guys!

I just thought of these:

To restrict by user:

If [Get(UserName) = "John Doe"]

How would you do a weekly backup (for example only backs up on a friday). I know I saw something like that somewhere but can't find it now.

Posted

Ahh I thought it was giving me the IP that was connected to the actual file, not to my machine.

And no, you can't save as a copy with a file opened on the server, but I was thinking that the GETIP's would work fine either way.

Ah well, I once again bow down to your superior knowledge :

Posted

For a weekly backup, try something like

If [Get(MultiUserState) <> 2 and DayOfWeek(Get(CurrentDate)) = 6]

Note that if you closed the files on the host machine several times on Friday, then the backup would occur several times. You could get around this by setting a global, or field in a single-record Preferences table, once the backup occurs. Check the value of this field each time the If statement is true and only backup when it it is unset or zero, etc. Then have your on open script unset the field when DayOfWeek(Get(CurrentDate)) <> 6, so that it is ready for the following Friday's backup.

Zero, give yourself a few thousand more posts and you'll get there. :wink2:

Posted

Let me ask a further question on this. Now I'm hosting the files 24/7...is there a way to specify or somehow create a script that will do the backup at a certain time or is this something only filemaker server is capable of?

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