.\" Process this man page with .\" groff -man -Tascii mxupdate.8 .\" .TH MXUPDATE 8 "July 2005" "MX Administrator Manuals" .SH NAME mxupdate \- MX save/restore program .SH SYNOPSIS .B mxupdate [ .I options .B ] .I update_list_fn savefile1 [ savefile2 ] .SH DESCRIPTION .B mxupdate is a save/restore utility which is normally started as a server by the .B mx(8) init script. However, it can also be directly invoked by users to manually save or restore individual sets of MX and/or EPICS database variables. .I update_list_fn is a file listing the database variables that are to be saved or restored during this invocation of .B mxupdate. The format of this file is described further in the man page .B mxupdate.dat(5). .I savefile1 and the optional .I savefile2 are the names of the files that database variables are saved to or restored from. The format of this file is described in the man page .B mxupdate_save(5). If both filenames are specified on the command line and no option flags have been specified, then .B mxupdate will look at the newer of the two files to see if the file is a complete save file with the last line containing the string "********". If the last line with the string of asterisks is not present, .B mxupdate assumes that a previous invocation of .B mxupdate crashed while in the middle of writing out the save file. In this case, .B mxupdate looks at the older of the two save files and looks to see if that file has the terminating string of asterisks. Once .B mxupdate has found the newest available complete save file, it attempts to restore the values in it to the MX and/or EPICS database variables specified in .B mxupdate.dat. If no complete save file is found, then .B mxupdate does not attempt to restore any values. If it is running as a server, periodically .B mxupdate writes a snapshot of the current values of the variables specified in the file .B mxupdate.dat to one or the other of the two specified savefiles. .B mxupdate alternates back and forth between the two savefiles, first overwriting one and the next overwriting the other. The intention here is to maximize the chance that one of the two savefiles is a valid complete savefile. The default period for this operation is 30 seconds. .SH OPTIONS .IP "-d level" sets the debugging level to the specified value. .IP "-l log_number" specifies which of the logs to use from the available values of LOG_LOCAL0 to LOG_LOCAL7. Note that you specify the numerical value alone without LOG_LOCAL in front of it. .IP "-L log_number" does the same thing as the .I -l option, except that messages are also logged to stderr in this case. .IP "-P default_display_precision" specifys how many digits after the decimal point are to be displayed in values written to the save file. .IP -R tells .B mxupdate to start up without attempting to restore from a save file. .IP -r tells .B mxupdate to restore a set of database variables from the specified file and then exit. This is intended for use in manual restores of parameters. .IP -s tells .B mxupdate to save a set of database variables to the requested file and then exit. This is intended for use in manual saves of parameters. .IP "-u update_interval" specifies an alternate interval for writing out savefiles in seconds. The default value is 30 seconds. .SH EXAMPLES Note that the normal value of the environment variable MXDIR in the following is /opt/mx. The conventional way to start .B mxupdate is implicitly via the standard MX init script $MXDIR/sbin/mx with a command line like /opt/mx/sbin/mx start If you want to directly start .B mxupdate in the way that the .B mx(8) script does it, use a command like /opt/mx/sbin/mxupdate /opt/mx/etc/mxupdate.dat \ /opt/mx/state/mxsave.1 /opt/mx/state/mxsave.2 If you want to manually save the database variables described in the file .I mylist.dat to the save file .I mysave.dat, use a command line like /opt/mx/sbin/mxupdate -s mylist.dat mysave.dat If you want to manually restore the database variables described in the file .I mylist.dat from the save file .I mysave.dat use a command line like /opt/mx/sbin/mxupdate -r mylist.dat mysave.dat .SH FILES .I $MXDIR/etc/mxupdate.dat - default configuration file that describes the set of variables to be saved or restored. .I $MXDIR/state/mxsave.1 and $MXDIR/state/mxsave.2 - these are the save/restore files used by .B mxupdate if started through the standard .B mx(8) init script. .SH SEE ALSO .B mxupdate.dat(5), mxupdate_save(5), mx(8) .SH AUTHOR William Lavender