How to determine if backup process is done?

Get help for specific problems
Posts: 74
Joined: 17 Mar 2008

mfreedberg

We are making really good progress in getting FreeFileSync incorporated in our
tech refresh process, including user data backup and restore. This process
relies on FreeFileSync to do the data backup as a mirror to a backup location
on the network, with locally monitored directories and a short window between
runs. This is working very well and copy speeds are great, but now we are
trying to figure out how to track the completion of the sync job running in
silent mode. Once the backup is done, we are looking to automate a backend
process to kick off an email to the user, but this would really rely on the
fact that we know the backup operation is done.

One option would be to have RealtimeSync run a "wrapper" that would look for
some conditions, then run our FreeFileSync batch command and watch for a
return code.

Is there a better way to do this? Does FreeFileSync have a list of return
codes we can use or are success/failures logged in some way beyond the verbose
log for the actual backup process? Any support for Event log entries on
Windows or other event sources we can use to monitor the backup status and
really know for sure that the backup operation is complete?
User avatar
Site Admin
Posts: 7050
Joined: 9 Dec 2007

Zenju

The "wrapper" should be a bat/cmd file that start sync synchronously(!) and
then does whatever is required after sync. See the helpfile under
"Advanced/Batch Scripting" on how to detect successful execution
Posts: 74
Joined: 17 Mar 2008

mfreedberg

Ok, so by synchronous, you mean "start it and wait for it for finish..." so
that we can get an error code back and not have RealTimeSync try to run
another round until the first one is really done.

What numeric error codes do you return? If we can in fact use the error codes
to evaluate the nature of any failures, that might help us as well.

For the moment, we'll assume that everything other than 0 is a failure of one
kind or another, and that 0 is a successfully completed sync operation.
User avatar
Site Admin
Posts: 7050
Joined: 9 Dec 2007

Zenju

>synchronous
I just mentioned it because calling another program from within a bat/cmd file
can also be asychronous (e.g. "start "" program.exe) which won't return a
reasonable error code.

>What numeric error codes do you return?
0 on success, < 0 if warnings or errors occured
Posts: 74
Joined: 17 Mar 2008

mfreedberg

just to close out the thread, we are using a wrapper script and a flag file to
catch the return; if FreeFileSync exits AND we see our custom flag file on the
server, we made it through all the required folder pairs. A separate process
(run at next login) looks to see if our flag file is on the server, we update
the database status and it's off to the races!