Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Backup Procedure


Jorgen

Recommended Posts

I would like to make a script with the following possibilitys.

1: User fill in path for backup (example: c:\database\backup)

2: User fill in filename (example: contact.fp7)

3: Press go button

 

I already tryed to make something with all kind of fields but i ran into a

cmd problem. With to go button i created a simpel batch file with the

copy command inside it.

xcopy c:\database\contact.fp7 c:\database\backup\26032008 contact.fp7

When there are more copy commands in this batch files it will copy the first copy command but not the second.

 

I know there is a more simple way "save a copy as" but.....

 

Tnx Jorgen!

Link to comment
Share on other sites

I'm not sure I can help with the commands. but please never ever perform backups on live databases, it is a source of data corruption. If you have filemaker server, use it's built-in scheduler to create regular backups safely. If you don't have Filemaker Server, close the database before performing the backup.

Link to comment
Share on other sites

  • 1 month later...
I'm not sure I can help with the commands. but please never ever perform backups on live databases, it is a source of data corruption. If you have filemaker server, use it's built-in scheduler to create regular backups safely. If you don't have Filemaker Server, close the database before performing the backup.

 

Kjoe,

Does this apply to the "Save as a copy" command? I have scripted this command to run everytime I close my file. Is the corruption on the copied file or the open file?

 

John Coffey

Link to comment
Share on other sites

I'm pretty confident you can use this script step safely in single-user situations, however I do not know about networked solutions.

I'm not sure I can answer the second question. At least the open file, but the corruption would / could be copied subsequently to the backup.

Link to comment
Share on other sites

I'm pretty confident you can use this script step safely in single-user situations, however I do not know about networked solutions.

AFAIK, the Save A Copy As… command is safe to use in all cases where it is available. It is only available where the client is the host of the file. Therefore it is not available to any user accessing a database hosted by FileMaker Server or who is a guest in a peer-to-peer sharing situation.

 

If the host in a peer-to-peer sharing situation performs the command, the copy created contains all committed data and schema changes.

 

Having said all that, paranoia is a good thing. I would probably script the backup process to check for guests first and only proceed where there are no guests.

Link to comment
Share on other sites

smiley-laughingThanks all for the feedback!smiley-laughing

 

Regards Jörgen

 

p.s. Been working on a script and it works perfect with 4 file references

Link to comment
Share on other sites

My script uses the Set Variable($nameDate;Value:"name" & table::dateCalc). The dateCalc field is: Substitute(Get (CurrentDate);"/";".") which strips backslashes from the date, which Filemaker will not let you use, and substitutes periods. If I backed up more than once a day, I'd use a time stamp rather than Get (CurrentDate).

 

Thanks for the help and answering questions. I'm kind of winging it and not always sure if there might be a problem with "my" way.

 

John Coffey

Link to comment
Share on other sites

FWIW, I believe someone here once advised me to use Commit Records before any Save As script step. That's what I'm doing.

Link to comment
Share on other sites

FWIW, I believe someone here once advised me to use Commit Records before any Save As script step. That's what I'm doing.

That is good advice:

 

If the host in a peer-to-peer sharing situation performs the command, the copy created contains all committed data and schema changes.
Link to comment
Share on other sites

Hi There,

 

JR: I tried the quotes but it didn't work.

 

John Coffey:

Anyway about creating the backup.

I have 4 file references. In file 1 there's

a script via a button.

Save a copy of file 1

Open file 2

Close file 1

 

In file 2 is a startup script

Save a copy of file 2

Open file 3

Close file 1

 

Same in file 3 & 4

 

When i use the command "Save a copy" i have no abbility to create

a variabel name. This is a static.

How do i create a backup name with a date and time in it?

 

Thanks to you all for leraning me the tricks!

 

Jörgen

Link to comment
Share on other sites

This thread is quite old. Please start a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

Terms of Use